2
0
mirror of https://codeberg.org/kiss-community/repo synced 2024-12-21 23:00:06 -07:00

util-linux: fix posix patch

This commit is contained in:
git-bruh 2024-04-03 20:38:43 +05:30
parent d7cb7c54e1
commit 49ce85c84c
No known key found for this signature in database
2 changed files with 9 additions and 4 deletions

View File

@ -1,2 +1,2 @@
6d1740c74ea7e47037320259b0e7a772aabc1cfcccf4ac2d3cc1726639ecb92d18
5693b92b54eb479474dc706fdbca7afd1e09af992b9614b913130a7766606ed2e0
6b51fa77e279b775004865b7514650f06156406048fd652bfbf10a84f031599444

View File

@ -1,5 +1,5 @@
diff --git a/tools/all_syscalls b/tools/all_syscalls
index 9c14778..062ac4e 100755
index 9c14778..8f0d582 100755
--- a/tools/all_syscalls
+++ b/tools/all_syscalls
@@ -1,4 +1,4 @@
@ -8,7 +8,7 @@ index 9c14778..062ac4e 100755
set -e
@@ -7,9 +7,9 @@ SYSCALL_INCLUDES="
@@ -7,9 +7,14 @@ SYSCALL_INCLUDES="
#include <sys/syscall.h>
"
@ -18,6 +18,11 @@ index 9c14778..062ac4e 100755
-"$@" -MD -MF "$OUTPUT.deps" <<< "$SYSCALL_INCLUDES" -dM -E - \
- | gawk 'match($0, /^#define __NR_([^ ]+)/, res) { print "UL_SYSCALL(\"" res[1] "\", __NR_" res[1] ")" }' \
+echo "$SYSCALL_INCLUDES" | "$@" -MD -MF "$OUTPUT.deps" -dM -E - \
+ | awk 'match($0, /^#define __NR_([^ ]+)/, res) { print "UL_SYSCALL(\"" res[1] "\", __NR_" res[1] ")" }' \
+ | awk 'match($0, /^#define __NR_([^ ]+)/) {
+ split(substr($0, RSTART + 1, RLENGTH - 1), syscall_split)
+ syscall_nr_def = syscall_split[2]
+ syscall_name = substr(syscall_nr_def, 6)
+ print "UL_SYSCALL(\"" syscall_name "\", " syscall_nr_def ")"
+ }' \
| sort \
> "$OUTPUT"