Commit 5d12615b authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] Fix do_shmat() for CONFIG_SYSVIPC=n

- The do_shmat() stub needs `static inline', not `inline'

- We need errno.h for ENOSYS.
parent 5da0c2c3
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
#define _LINUX_SHM_H_ #define _LINUX_SHM_H_
#include <linux/ipc.h> #include <linux/ipc.h>
#include <linux/errno.h>
#include <asm/page.h> #include <asm/page.h>
/* /*
...@@ -91,9 +92,10 @@ struct shmid_kernel /* private to the kernel */ ...@@ -91,9 +92,10 @@ struct shmid_kernel /* private to the kernel */
#define SHM_HUGETLB 04000 /* segment will use huge TLB pages */ #define SHM_HUGETLB 04000 /* segment will use huge TLB pages */
#ifdef CONFIG_SYSVIPC #ifdef CONFIG_SYSVIPC
long do_shmat (int shmid, char __user *shmaddr, int shmflg, unsigned long *addr); long do_shmat(int shmid, char __user *shmaddr, int shmflg, unsigned long *addr);
#else #else
inline long do_shmat (int shmid, char __user *shmaddr, int shmflg, unsigned long *addr) static inline long do_shmat(int shmid, char __user *shmaddr,
int shmflg, unsigned long *addr)
{ {
return -ENOSYS; return -ENOSYS;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment