summaryrefslogtreecommitdiff
path: root/pkg/linux-headers/unistd.awk
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2020-02-13 14:07:20 -0800
committerMichael Forney <mforney@mforney.org>2020-02-20 18:00:47 -0800
commitfac05879fd7b857d61ce5d34d45fe930fe0192a3 (patch)
tree11553b43ec426cb973b77348ad2b4254a75eee78 /pkg/linux-headers/unistd.awk
parent15df2417a80027ffe500d8ca6a4fc1ff1d26bca4 (diff)
Add linux-headers 5.5.3
Diffstat (limited to 'pkg/linux-headers/unistd.awk')
-rw-r--r--pkg/linux-headers/unistd.awk18
1 files changed, 18 insertions, 0 deletions
diff --git a/pkg/linux-headers/unistd.awk b/pkg/linux-headers/unistd.awk
new file mode 100644
index 00000000..32bc2c28
--- /dev/null
+++ b/pkg/linux-headers/unistd.awk
@@ -0,0 +1,18 @@
+BEGIN {
+ guard = toupper("_ASM_" arch "_" file)
+ gsub(/[^A-Za-z0-9_]/, "_", guard)
+ print "#ifndef " guard
+ print "#define " guard " 1"
+ print ""
+}
+
+$0 ~ /^[^#]+/ && $2 ~ "^(" abi ")$" {
+ if (off != "")
+ $1 = "(" off " + " $1 ")"
+ print "#define __NR_" $3, $1
+}
+
+END {
+ print ""
+ print "#endif /* " guard " */"
+}