about summary refs log tree commit homepage
path: root/devel
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2022-08-11 20:33:39 +0000
committerEric Wong <e@80x24.org>2022-08-11 21:57:56 +0000
commitcb4b682a91662d877a36e9fc52090852fae35fa2 (patch)
treecc6363ff9c8b617b0705b1c7853db461ff22e3c1 /devel
parent9ebb883f1a84f7be76ded974b3e86adf36b327e4 (diff)
downloadpublic-inbox-cb4b682a91662d877a36e9fc52090852fae35fa2.tar.gz
While I have no intention of using syscall numbers for
non-Linux, sizeof(pid_t) was useful for OpenBSD.  And maybe
Linux can have real competition from other OSes with stable
syscall numbers someday.
Diffstat (limited to 'devel')
-rwxr-xr-xdevel/syscall-list6
1 files changed, 5 insertions, 1 deletions
diff --git a/devel/syscall-list b/devel/syscall-list
index d33a8a78..adb450da 100755
--- a/devel/syscall-list
+++ b/devel/syscall-list
@@ -28,7 +28,10 @@ __DATA__
 #define _GNU_SOURCE
 #include <sys/syscall.h>
 #include <sys/ioctl.h>
+#ifdef __linux__
 #include <linux/fs.h>
+#endif
+#include <sys/types.h>
 #include <unistd.h>
 #include <stdio.h>
 
@@ -60,6 +63,7 @@ int main(void)
         D(SYS_renameat2);
 #endif
 #endif /* Linux, any other OSes with stable syscalls? */
-        printf("size_t=%zu off_t=%zu\n", sizeof(size_t), sizeof(off_t));
+        printf("size_t=%zu off_t=%zu pid_t=%zu\n",
+                 sizeof(size_t), sizeof(off_t), sizeof(pid_t));
         return 0;
 }