The Samba-Bugzilla – Attachment 11864 Details for
Bug 11746
Build failure on AIX 7.1.3, lib/tdb/tools/tdbtool.c, disable_lock name conflict
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch
0001-tdb-tools-fix-name-clash-on-aix.patch (text/plain), 1.95 KB, created by
Guillaume Xavier Taillon (mail address dead)
on 2016-02-22 20:56:00 UTC
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Guillaume Xavier Taillon (mail address dead)
Created:
2016-02-22 20:56:00 UTC
Size:
1.95 KB
patch
obsolete
>From 26b4e6baab5afc69dcea5d175903a732f7c1c63a Mon Sep 17 00:00:00 2001 >From: Guillaume Xavier Taillon <gtaillon@ca.ibm.com> >Date: Mon, 22 Feb 2016 15:41:35 -0500 >Subject: [PATCH] tdb:tools: fix name clash on aix > >"../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". > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=11746 >Signed-off-by: Guillaume Xavier Taillon <gtaillon@ca.ibm.com> >--- > lib/tdb/tools/tdbtool.c | 13 +++++++++---- > 1 files changed, 9 insertions(+), 4 deletions(-) > >diff --git a/lib/tdb/tools/tdbtool.c b/lib/tdb/tools/tdbtool.c >index beb3af1..4bb7be8 100644 >--- a/lib/tdb/tools/tdbtool.c >+++ b/lib/tdb/tools/tdbtool.c >@@ -36,7 +36,12 @@ char *line; > TDB_DATA iterate_kbuf; > char cmdline[1024]; > static int disable_mmap; >-static int disable_lock; >+ >+/* To avoid name clashing, do not refactor to disable_lock. >+ * On AIX "system/filesys.h" includes <sys/lock_def.h> which declares >+ * another function named disable_lock. >+ */ >+static int disable_tdblock; > > enum commands { > CMD_CREATE_TDB, >@@ -260,7 +265,7 @@ static void create_tdb(const char *tdbname) > tdb = tdb_open_ex(tdbname, 0, > TDB_CLEAR_IF_FIRST | > (disable_mmap?TDB_NOMMAP:0) | >- (disable_lock?TDB_NOLOCK:0), >+ (disable_tdblock?TDB_NOLOCK:0), > O_RDWR | O_CREAT | O_TRUNC, 0600, &log_ctx, NULL); > if (!tdb) { > printf("Could not create %s: %s\n", tdbname, strerror(errno)); >@@ -275,7 +280,7 @@ static void open_tdb(const char *tdbname) > if (tdb) tdb_close(tdb); > tdb = tdb_open_ex(tdbname, 0, > (disable_mmap?TDB_NOMMAP:0) | >- (disable_lock?TDB_NOLOCK:0), >+ (disable_tdblock?TDB_NOLOCK:0), > O_RDWR, 0600, > &log_ctx, NULL); > >@@ -803,7 +808,7 @@ int main(int argc, char *argv[]) > arg2len = 0; > > if (argv[1] && (strcmp(argv[1], "-l") == 0)) { >- disable_lock = 1; >+ disable_tdblock = 1; > argv[1] = argv[0]; > argv += 1; > argc -= 1; >-- >1.7.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 11746
: 11864