diff options
| author | Martin Schwenke <martin@meltin.net> | 2011-11-09 14:41:17 +1100 |
|---|---|---|
| committer | Martin Schwenke <martin@meltin.net> | 2011-11-09 14:41:17 +1100 |
| commit | 59b4d7bf9d0561700f0521396799786c19f0d007 (patch) | |
| tree | e8d4d3dc7ab1b675d7c1eb34b8c6722eb0276d81 | |
| parent | 44de394796b8b4f1b046ccf226372cd8ba9ad768 (diff) | |
Clean up warnings: ‘tevent_loop_allow_nesting’ is deprecated
CTDB wants to use these functions but Samba's tevent wants to mark
them deprecated. This adds a #define to shut up the warnings and sets
it in CFLAGS.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 788cdbddbc902a5b076d23473450065b551d274d)
| -rwxr-xr-x | ctdb/Makefile.in | 2 | ||||
| -rw-r--r-- | ctdb/lib/tevent/tevent.h | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/ctdb/Makefile.in b/ctdb/Makefile.in index 1f7128518c..8f26456c0e 100755 --- a/ctdb/Makefile.in +++ b/ctdb/Makefile.in @@ -37,7 +37,7 @@ CFLAGS=-g -I$(srcdir)/include -Iinclude -Ilib -Ilib/util -I$(srcdir) \ -I@tallocdir@ -I@tdbdir@/include -I@libreplacedir@ \ -DVARDIR=\"$(localstatedir)\" -DETCDIR=\"$(etcdir)\" \ -DLOGDIR=\"$(logdir)\" \ - -DUSE_MMAP=1 @CFLAGS@ $(POPT_CFLAGS) + -DUSE_MMAP=1 -DTEVENT_DEPRECATED_QUIET=1 @CFLAGS@ $(POPT_CFLAGS) LIB_FLAGS=@LDFLAGS@ -Llib @LIBS@ $(POPT_LIBS) @INFINIBAND_LIBS@ @CTDB_PCAP_LDFLAGS@ diff --git a/ctdb/lib/tevent/tevent.h b/ctdb/lib/tevent/tevent.h index d3bf3666d5..914548fd6e 100644 --- a/ctdb/lib/tevent/tevent.h +++ b/ctdb/lib/tevent/tevent.h @@ -28,7 +28,9 @@ #ifndef __TEVENT_H__ #define __TEVENT_H__ +#ifndef TEVENT_DEPRECATED #define TEVENT_DEPRECATED +#endif #include <stdint.h> #include <talloc.h> @@ -1262,6 +1264,7 @@ typedef int (*tevent_nesting_hook)(struct tevent_context *ev, void *stack_ptr, const char *location); #ifdef TEVENT_DEPRECATED +#if (TEVENT_DEPRECATED_QUIET != 1) #ifndef _DEPRECATED_ #if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 ) #define _DEPRECATED_ __attribute__ ((deprecated)) @@ -1269,6 +1272,10 @@ typedef int (*tevent_nesting_hook)(struct tevent_context *ev, #define _DEPRECATED_ #endif #endif +#else +#undef _DEPRECATED_ +#define _DEPRECATED_ +#endif void tevent_loop_allow_nesting(struct tevent_context *ev) _DEPRECATED_; void tevent_loop_set_nesting_hook(struct tevent_context *ev, tevent_nesting_hook hook, |
