Samba 3.0.8/3.0.9 compile failure under Tru64 Unix 4.0g. Running make fails as follows for either Samba version: . . . ----------------------------------------------------^ cc: Info: include/proto.h, line 6731: In this declaration, type "unsigned long l ong" is a language extension. (longlongtype) int vfs_allocate_file_space(files_struct *fsp, SMB_BIG_UINT len); -----------------------------------------------^ cc: Info: lib/util_file.c, line 171: In this declaration, type "unsigned long lo ng" is a language extension. (longlongtype) SMB_BIG_UINT getfilepwpos(void *vp) ^ cc: Info: lib/util_file.c, line 173: In this statement, type "unsigned long long " is a language extension. (longlongtype) return (SMB_BIG_UINT)sys_ftell((FILE *)vp); ----------------^ cc: Info: lib/util_file.c, line 181: In this declaration, type "unsigned long lo ng" is a language extension. (longlongtype) BOOL setfilepwpos(void *vp, SMB_BIG_UINT tok) ----------------------------^ cc: Error: lib/util_file.c, line 458: In this statement, "p" and "(-1)" cannot b e compared for equality or inequality. (noequality) if (p == MAP_FAILED) { ------------^ *** Exit 1 Stop. #
As far as I found out this bug was introduced first in 3.0.8 through switching from Autoconf 2.53 to Autoconf 2.59. The later autoconf generates Makefiles for Tru64 4.0[fg] which use "CC=cc -std1" instead of "CC=cc". -std1 handles comparisms a little bit tougher (well too tough is this case) and so samba stumbles over the definition of MAP_FAILED (-1L) in /usr/sys/include/sys/mman.h . this "should" be defined to ((void *)-1L). lib/util_file.c does this for you, but since it already has been defined in .../sys/mman.h it ignored. The same problem appears in tdb/tdb.c Since I dunno much about autoconf/configure (besides I hate it) I cannot supply a proper patch to fix this, but I'm confident someone here will 8) So to fix this, some developers should * ignore the system supplied definition of MAP_FAILED * redefine MAP_FAILED to ((void *)-1L) or patch lib/util_file.c and tdb/tdb.c to reflect this.
Please retest against a current release and reopen if the issue is still present.
*** Bug 4376 has been marked as a duplicate of this bug. ***