xtensa: allow multi-inclusion for uapi/unistd.h
Xtensa implements a method that allows to generate a arbitrary output for each system call by defining the __SYSCALL(number, function, num_args). This usually requires to include uapi/unistd.h twice. Instead of removing the guard agains multiple inclusion entirely, allow to include unistd.h again only if __SYSCALL is defined. Note that __SYSCALL gets always undefined at the end of the file. Signed-off-by: Chris Zankel <chris@zankel.net>
This commit is contained in:
@@ -32,10 +32,8 @@ typedef void (*syscall_t)(void);
|
||||
syscall_t sys_call_table[__NR_syscall_count] /* FIXME __cacheline_aligned */= {
|
||||
[0 ... __NR_syscall_count - 1] = (syscall_t)&sys_ni_syscall,
|
||||
|
||||
#undef __SYSCALL
|
||||
#define __SYSCALL(nr,symbol,nargs) [ nr ] = (syscall_t)symbol,
|
||||
#undef __KERNEL_SYSCALLS__
|
||||
#include <asm/unistd.h>
|
||||
#include <uapi/asm/unistd.h>
|
||||
};
|
||||
|
||||
asmlinkage long xtensa_shmat(int shmid, char __user *shmaddr, int shmflg)
|
||||
@@ -49,7 +47,8 @@ asmlinkage long xtensa_shmat(int shmid, char __user *shmaddr, int shmflg)
|
||||
return (long)ret;
|
||||
}
|
||||
|
||||
asmlinkage long xtensa_fadvise64_64(int fd, int advice, unsigned long long offset, unsigned long long len)
|
||||
asmlinkage long xtensa_fadvise64_64(int fd, int advice,
|
||||
unsigned long long offset, unsigned long long len)
|
||||
{
|
||||
return sys_fadvise64_64(fd, offset, len, advice);
|
||||
}
|
||||
|
Reference in New Issue
Block a user