2
0
mirror of https://codeberg.org/kiss-community/repo synced 2025-01-07 10:14:55 -07:00
repo/extra/util-linux/patches/posix.patch

26 lines
617 B
Diff
Raw Normal View History

2024-03-30 11:31:57 -06:00
diff --git a/tools/all_syscalls b/tools/all_syscalls
2024-06-01 18:12:21 -06:00
index eccb0d0..3d7a34f 100755
2024-03-30 11:31:57 -06:00
--- a/tools/all_syscalls
+++ b/tools/all_syscalls
2024-06-01 18:12:21 -06:00
@@ -1,7 +1,6 @@
2024-03-30 11:31:57 -06:00
-#!/bin/bash
+#!/bin/sh
set -e
2024-06-01 18:12:21 -06:00
-set -o pipefail
2024-03-30 11:31:57 -06:00
2024-06-01 18:12:21 -06:00
SED="$1"
shift
@@ -10,9 +9,9 @@ SYSCALL_INCLUDES="
2024-03-30 11:31:57 -06:00
#include <sys/syscall.h>
"
2024-06-01 18:12:21 -06:00
-trap 'rm -f $OUTPUT $OUTPUT.deps' ERR
+trap '[ $? -eq 0 ] || rm -f $OUTPUT $OUTPUT.deps' EXIT
2024-03-30 11:31:57 -06:00
-"$@" -MD -MF "$OUTPUT.deps" <<< "$SYSCALL_INCLUDES" -dM -E - \
+echo "$SYSCALL_INCLUDES" | "$@" -MD -MF "$OUTPUT.deps" -dM -E - \
2024-06-01 18:12:21 -06:00
| "$SED" -n -e 's/^#define __NR_\([^ ]*\).*$/UL_SYSCALL("\1", __NR_\1)/p' \
2024-03-30 11:31:57 -06:00
| sort \
> "$OUTPUT"