Bug 11746 - Build failure on AIX 7.1.3, lib/tdb/tools/tdbtool.c, disable_lock name conflict
Summary: Build failure on AIX 7.1.3, lib/tdb/tools/tdbtool.c, disable_lock name conflict
Status: RESOLVED DUPLICATE of bug 13493
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Build (show other bugs)
Version: 4.3.4
Hardware: PPC AIX
: P5 normal (vote)
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-22 20:47 UTC by Guillaume Xavier Taillon (mail address dead)
Modified: 2018-12-24 18:56 UTC (History)
2 users (show)

See Also:


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

Note You need to log in before you can comment on or make changes to this bug.
Description Guillaume Xavier Taillon (mail address dead) 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 (mail address dead) 2016-02-22 20:56:00 UTC
Created attachment 11864 [details]
Proposed patch
Comment 2 Peter (mail address dead) 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
Comment 3 Mark Kica (dead mail address) 2016-12-21 15:59:12 UTC
Works also for 4.5.1
Comment 4 Björn Jacke 2018-12-24 18:54:11 UTC
this was fixed in master with edffe4d16514fa0c87655e040842f6c20d89791c
Comment 5 Björn Jacke 2018-12-24 18:56:55 UTC

*** This bug has been marked as a duplicate of bug 13493 ***