fix missing argument in variadic syscall macros
authorRich Felker <dalias@aerifal.cx>
Wed, 17 Jul 2013 14:43:04 +0000 (10:43 -0400)
committerRich Felker <dalias@aerifal.cx>
Wed, 17 Jul 2013 14:43:04 +0000 (10:43 -0400)
for 0-argument syscalls (1 argument to the macro, the syscall number),
the __SYSCALL_NARGS_X macro's ... argument was not satisfied. newer
compilers seem to care about this.

src/internal/syscall.h

index 7381efea8d4d1e235d69909074645fca50d3e61e..8eebe71e3ba4c1cec5de535dfc8e7a7d12137d6b 100644 (file)
@@ -19,7 +19,7 @@ long __syscall_ret(unsigned long), __syscall(long, ...),
 #define __syscall7(n,a,b,c,d,e,f,g) (__syscall)(n,(long)(a),(long)(b),(long)(c),(long)(d),(long)(e),(long)(f),(long)g)
 
 #define __SYSCALL_NARGS_X(a,b,c,d,e,f,g,h,n,...) n
-#define __SYSCALL_NARGS(...) __SYSCALL_NARGS_X(__VA_ARGS__,7,6,5,4,3,2,1,0)
+#define __SYSCALL_NARGS(...) __SYSCALL_NARGS_X(__VA_ARGS__,7,6,5,4,3,2,1,0,)
 #define __SYSCALL_CONCAT_X(a,b) a##b
 #define __SYSCALL_CONCAT(a,b) __SYSCALL_CONCAT_X(a,b)
 #define __SYSCALL_DISP(b,...) __SYSCALL_CONCAT(b,__SYSCALL_NARGS(__VA_ARGS__))(__VA_ARGS__)