Throw the compiler a bone ...
[openafs.git] / src / afs / LINUX / osi_syscall.c
index 0a85aa6..c306309 100644 (file)
@@ -18,8 +18,8 @@
 #include <linux/module.h> /* early to avoid printf->printk mapping */
 #include "afs/sysincludes.h"
 #include "afsincludes.h"
-#include "h/unistd.h"          /* For syscall numbers. */
-#include "h/mm.h"
+#include <linux/unistd.h>              /* For syscall numbers. */
+#include <linux/mm.h>
 
 #ifdef AFS_AMD64_LINUX20_ENV
 #include <asm/ia32_unistd.h>
@@ -82,7 +82,9 @@ static SYSCALLTYPE afs_ni_syscall = 0;
 
 #ifdef AFS_S390X_LINUX24_ENV
 static void *afs_sys_setgroups_page = 0;
+#if defined(__NR_setgroups32)
 static void *afs_sys_setgroups32_page = 0;
+#endif
 static void *afs_syscall_page = 0;
 
 /* Because of how the syscall table is handled, we need to ensure our 
@@ -97,10 +99,10 @@ uint32_t syscall_jump_code[] = {
 };
 #endif
 
-extern long afs_xsetgroups(int gidsetsize, gid_t * grouplist);
+extern asmlinkage long afs_xsetgroups(int gidsetsize, gid_t * grouplist);
 asmlinkage long (*sys_setgroupsp) (int gidsetsize, gid_t * grouplist);
 
-extern int afs_xsetgroups32(int gidsetsize, gid_t * grouplist);
+extern asmlinkage long afs_xsetgroups32(int gidsetsize, gid_t * grouplist);
 asmlinkage int (*sys_setgroups32p) (int gidsetsize,
                                    __kernel_gid32_t * grouplist);
 
@@ -109,9 +111,9 @@ asmlinkage int (*sys_setgroups32p) (int gidsetsize,
 static SYSCALLTYPE *afs_ia32_sys_call_table;
 static SYSCALLTYPE ia32_ni_syscall = 0;
 
-extern int afs32_xsetgroups();
+extern asmlinkage long afs32_xsetgroups(int gidsetsize, u16 * grouplist);
 asmlinkage long (*sys32_setgroupsp) (int gidsetsize, u16 * grouplist);
-extern int afs32_xsetgroups32();
+extern asmlinkage long afs32_xsetgroups32(int gidsetsize, gid_t * grouplist);
 asmlinkage long (*sys32_setgroups32p) (int gidsetsize, gid_t * grouplist);
 #endif /* AFS_AMD64_LINUX20_ENV */
 
@@ -123,20 +125,20 @@ static SYSCALLTYPE afs_ni_syscall32 = 0;
 static SYSCALLTYPE old_sys_setgroupsp = 0;
 static SYSCALLTYPE old_sys32_setgroupsp = 0;
 
-extern int afs32_xsetgroups();
+asmlinkage long afs32_xsetgroups(int gidsetsize, gid_t *grouplist);
 asmlinkage long (*sys32_setgroupsp)(int gidsetsize, gid_t *grouplist);
 
 asmlinkage long sys_close(unsigned int fd);
-static void sys_setgroups_stub() 
+static void sys_setgroups_stub(void)
        __attribute__ ((pure,const,no_instrument_function));
-static void sys_setgroups_stub() 
+static void sys_setgroups_stub(void)
 { 
        printf("*** error! sys_setgroups_stub called\n");
 }
 
-static void sys32_setgroups_stub() 
+static void sys32_setgroups_stub(void)
        __attribute__ ((pure,const,no_instrument_function));
-static void sys32_setgroups_stub() 
+static void sys32_setgroups_stub(void)
 { 
        printf("*** error! sys32_setgroups_stub called\n");
 }
@@ -149,12 +151,12 @@ static void sys32_setgroups_stub()
 static SYSCALLTYPE *afs_sys_call_table32;
 static SYSCALLTYPE afs_ni_syscall32 = 0;
 
-extern int afs32_xsetgroups();
+extern asmlinkage long afs32_xsetgroups(int gidsetsize, u16 * grouplist);
 asmlinkage int (*sys32_setgroupsp) (int gidsetsize,
                                    __kernel_gid32_t * grouplist);
 /* This number is not exported for some bizarre reason. */
 #define __NR_setgroups32      82
-extern int afs32_xsetgroups32();
+extern asmlinkage long afs32_xsetgroups32(int gidsetsize, gid_t * grouplist);
 asmlinkage int (*sys32_setgroups32p) (int gidsetsize,
                                      __kernel_gid32_t * grouplist);