Subject: Samba 2.2.0 fails to compile on NetBSD/i386 1.4.2
To: None <current-users@netbsd.org>
From: Olaf Seibert <rhialto@polderland.nl>
List: current-users
Date: 05/17/2001 15:21:21
Samba 2.2.0 (from current pkgsrc) fails to compile on NetBSD/i386 1.4.2.
This is the tail of the make output:

Compiling printing/pcap.c
Compiling printing/print_svid.c
Compiling printing/print_cups.c
Compiling printing/print_generic.c
Compiling printing/lpq_parse.c
Compiling printing/load.c
Compiling profile/profile.c
profile/profile.c: In function `profile_setup':
profile/profile.c:110: `SHM_R' undeclared (first use in this function)
profile/profile.c:110: (Each undeclared identifier is reported only once
profile/profile.c:110: for each function it appears in.)
profile/profile.c:110: `SHM_W' undeclared (first use in this function)
*** Error code 1

Stop.
*** Error code 1

Stop.
*** Error code 1

Stop.
*** Error code 1

Stop.
klei.0:/usr/src/pkgsrc/net/samba$

It appears that line 29 of profile/profile.c is guilty:

#define IPC_PERMS ((SHM_R | SHM_W) | (SHM_R>>3) | (SHM_R>>6))

<sys/shm.h> #defines only SHM_RDONLY. 
<sys/ipc.h> #defines IPC_R and IPC_W. Maybe these should be used
instead? Reading shmget(2) sort-of suggests this. But these names are
inside an #ifdef _KERNEL.

-Olaf.
-- 
___ Olaf 'Rhialto' Seibert - rhialto@polder --Soep van de dag, wat zal dat zijn
\X/ land.nl     --wat kan dat wezen, beter maar het ergste vrezen -Boy Bensdorp