diff options
author | Amitay Isaacs <amitay@gmail.com> | 2018-06-29 16:12:30 +1000 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2018-07-10 10:44:13 +0200 |
commit | a95e5286a4c06cf447f6943a01063863b61a99fa (patch) | |
tree | 63f7d993be280338602445ec6f8a8ac02a5e52b6 /lib | |
parent | ac5ca1d3cbb51488bb437d7014f7134745a983a4 (diff) | |
download | samba-a95e5286a4c06cf447f6943a01063863b61a99fa.tar.gz |
tdb: Fix build on AIX
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13493
Here is the build error on AIX 7.1.
../../lib/tdb/tools/tdbtool.c:39:12: error: 'disable_lock' redeclared as different kind of symbol
static int disable_lock;
^~~~~~~~~~~~
In file included from /usr/include/sys/gfs.h:24:0,
from /usr/include/sys/vfs.h:27,
from ../../lib/replace/system/filesys.h:48,
from ../../lib/tdb/tools/tdbtool.c:26:
/usr/include/sys/lock_def.h:314:5: note: previous declaration of 'disable_lock' was here
int disable_lock(int,simple_lock_t);
^~~~~~~~~~~~
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
(cherry picked from commit edffe4d16514fa0c87655e040842f6c20d89791c)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/tdb/tools/tdbtool.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/tdb/tools/tdbtool.c b/lib/tdb/tools/tdbtool.c index e3535b93c7c..7a36ce2b71a 100644 --- a/lib/tdb/tools/tdbtool.c +++ b/lib/tdb/tools/tdbtool.c @@ -36,7 +36,7 @@ char *line; TDB_DATA iterate_kbuf; char cmdline[1024]; static int disable_mmap; -static int disable_lock; +static int _disable_lock; enum commands { CMD_CREATE_TDB, @@ -263,7 +263,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_lock?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)); @@ -278,7 +278,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_lock?TDB_NOLOCK:0), O_RDWR, 0600, &log_ctx, NULL); @@ -890,7 +890,7 @@ int main(int argc, char *argv[]) arg2len = 0; if (argv[1] && (strcmp(argv[1], "-l") == 0)) { - disable_lock = 1; + _disable_lock = 1; argv[1] = argv[0]; argv += 1; argc -= 1; |