Bug 11746 - Build failure on AIX 7.1.3, lib/tdb/tools/tdbtool.c, disable_lock name conflict
Build failure on AIX 7.1.3, lib/tdb/tools/tdbtool.c, disable_lock name conflict
Status: NEW
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Build
4.3.4
PPC AIX
: P5 normal
: ---
Assigned To: Samba QA Contact
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-22 20:47 UTC by Guillaume Xavier Taillon
Modified: 2016-05-11 12:31 UTC (History)
2 users (show)

See Also:


Attachments
Proposed patch (1.95 KB, patch)
2016-02-22 20:56 UTC, Guillaume Xavier Taillon
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Guillaume Xavier Taillon 2016-02-22 20:47:52 UTC
Build failure on AIX 7.1.3, lib/tdb/tools/tdbtool.c, disable_lock name conflict
AIX Version: 7100-03-05-1524
XLC Version: 13.01.0003.0000
Samba Version: 4.3.4

Make fails with the following error:

[1119/3427] Compiling lib/tdb/tools/tdbtool.c
"../lib/tdb/tools/tdbtool.c", line 39.12: 1506-343 (S) Redeclaration of
disable_lock differs from previous declaration on line 314 of
"/usr/include/sys/lock_def.h".
"../lib/tdb/tools/tdbtool.c", line 39.12: 1506-382 (I) The type "int" of
identifier disable_lock differs from previous type "int(int,union
_simple_lock*)".
Waf: Leaving directory `/usr/src/samba-4.3.4/bin'
Build failed:  -> task failed (err #1): 
        {task: cc tdbtool.c -> tdbtool_12.o}

This is an unfortunate name clash with the unrelated disable_lock kernel
service included by
lib/replace/system/filesys.h
-> /usr/include/sys/vfs.h
---> /usr/include/sys/gfs.h     
-----> /usr/include/sys/lock_def.h

Renaming tdbtool.c's disable_lock to something else fixes the problem.
Comment 1 Guillaume Xavier Taillon 2016-02-22 20:56:00 UTC
Created attachment 11864 [details]
Proposed patch
Comment 2 Peter 2016-05-11 12:31:45 UTC
This also applies to Samba 4.4.3 with xlc compiler 13.1.3
This patch works correctly