]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Fix do_shmat() for CONFIG_SYSVIPC=n
authorAndrew Morton <akpm@osdl.org>
Mon, 23 Feb 2004 06:16:13 +0000 (22:16 -0800)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Mon, 23 Feb 2004 06:16:13 +0000 (22:16 -0800)
- The do_shmat() stub needs `static inline', not `inline'

- We need errno.h for ENOSYS.

include/linux/shm.h

index 69698d3440532f7e4e8bbfb9b739b8df9c2a72c2..1f2b5ee1089781f0d4c8c589e57e91221e166543 100644 (file)
@@ -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;
 }