Problems compiling Samba 2.0.3

Jan Kratochvil short at ucw.cz
Sat Apr 17 19:24:32 GMT 1999


> On 17 Apr 99, jrubio <jrubio at edei.es> had questions about Problems 
> compiling Samba 2.0.3:  
> 
> > I have a problem when I compile Samba 2.0.3, the next error message is
> > generated doing "make":
> > 
> > Using LIBS =
> > Compiling locking/shmem.c
> > locking/shmem.c: In function `smb_shm_open':
> > locking/shmem.c:921: `PROT_READ' undeclared (first use this function)
> > locking/shmem.c:921: (Each undeclared identifier is reported only once
> > locking/shmem.c:921: for each function it appears in.)
> > locking/shmem.c:921: `PROT_WRITE' undeclared (first use this function)
> > locking/shmem.c:922: `MAP_SHARED' undeclared (first use this function)
> > make: *** [locking/shmem.o] Error 1
> > 
> > The "configure" is OK, my Linux Kernel is 2.0.35 and my gcc  is 2.8.1, It
> > is the first time that I have a problem when I compile.
> 
> It sure looks like you're missing a header file where the above 
...
> Steve

  As I see the thread growing about pointless problem, attached is a hack
diff to fix it. But either "jrubio" has system on fire or the new configure
system is not flexible enough and should be updated.


					Bye, Lace
-------------- next part --------------
--- samba-2.0.3/source/locking/shmem.c-orig	Sat Apr 17 21:17:53 1999
+++ samba-2.0.3/source/locking/shmem.c	Sat Apr 17 21:20:18 1999
@@ -21,6 +21,18 @@
 */
 
 #include "includes.h"
+#ifndef PROT_READ
+#define PROT_READ       0x1             /* Page can be read.  */
+#endif
+#ifndef PROT_WRITE
+#define PROT_WRITE      0x2             /* Page can be written.  */
+#endif
+#ifndef MAP_FILE
+# define MAP_FILE       0
+#endif
+#ifndef MAP_SHARED
+#define MAP_SHARED      0x01            /* Share changes.  */
+#endif
 
 
 #ifdef HAVE_SHARED_MMAP


More information about the samba mailing list