Problems compiling Samba 2.0.3

Stephen L Arnold sarnold at
Sat Apr 17 17:18:08 GMT 1999

On 17 Apr 99, jrubio <jrubio at> 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 
identifiers are declared.  I'm certainly no C whiz (although I 
*did* get an A in my one and only C class last semester - I had a 
good teacher); it's either missing from the samba source or your 
gcc libs.  Check and see where your gcc is reading the specs from; 
maybe it's looking in the wrong place.  Are you running linux, and 
if so, what kernel?  I'll poke around on my system and see what I 
can find.


Steve Arnold           

   "A mime is a terrible thing to waste..."   Mel Brooks

More information about the samba mailing list