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 @@
#define _LINUX_SHM_H_
#include <linux/ipc.h>
#include <linux/errno.h>
#include <asm/page.h>
/*
......@@ -91,9 +92,10 @@ struct shmid_kernel /* private to the kernel */
#define SHM_HUGETLB 04000 /* segment will use huge TLB pages */
#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
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;
}
......
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