chiark / gitweb /
missing: always use __NR_ as prefix for syscall numbers
authorLennart Poettering <lennart@poettering.net>
Wed, 21 Feb 2018 16:27:34 +0000 (17:27 +0100)
committerSven Eden <yamakuzure@gmx.net>
Wed, 30 May 2018 05:59:02 +0000 (07:59 +0200)
Apparently, both __NR_ and SYS_ are useful, but we mostly use __NR_
hence use it for these two cases too, so that we settle on __NR_
exclusively.

src/basic/missing_syscall.h

index 7e542c3d09d096fecf52ff9966bac1974066f821..6253f28a13c221cc5e8a13ad1831eade6746a07a 100644 (file)
@@ -28,7 +28,7 @@
 
 #if !HAVE_PIVOT_ROOT
 static inline int missing_pivot_root(const char *new_root, const char *put_old) {
-        return syscall(SYS_pivot_root, new_root, put_old);
+        return syscall(__NR_pivot_root, new_root, put_old);
 }
 
 #  define pivot_root missing_pivot_root
@@ -131,7 +131,7 @@ static inline int missing_getrandom(void *buffer, size_t count, unsigned flags)
 
 #if !HAVE_GETTID
 static inline pid_t missing_gettid(void) {
-        return (pid_t) syscall(SYS_gettid);
+        return (pid_t) syscall(__NR_gettid);
 }
 
 #  define gettid missing_gettid