From cb4b682a91662d877a36e9fc52090852fae35fa2 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 11 Aug 2022 20:33:39 +0000 Subject: devel/syscall-list: support non-Linux, show sizeof(pid_t) 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. --- devel/syscall-list | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'devel') 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 #include +#ifdef __linux__ #include +#endif +#include #include #include @@ -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; } -- cgit v1.2.3-24-ge0c7