summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2015-01-08 10:24:36 +0100
committerMartin Schwenke <martins@samba.org>2015-01-08 21:41:30 +0100
commit87c176563baea3458c5322f1e3dfae6cf074b4b4 (patch)
treedce7ba9a02a64bff13ac3202f4fa6243c5825aad /lib
parent8d4cac1245c3a9b29926be0a4a0daff0933b0260 (diff)
downloadsamba-87c176563baea3458c5322f1e3dfae6cf074b4b4.tar.gz
samba-87c176563baea3458c5322f1e3dfae6cf074b4b4.tar.xz
samba-87c176563baea3458c5322f1e3dfae6cf074b4b4.zip
lib/util: Avoid collision which alread defined consumer DEBUG macro.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11033 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> Autobuild-User(master): Martin Schwenke <martins@samba.org> Autobuild-Date(master): Thu Jan 8 21:41:30 CET 2015 on sn-devel-104
Diffstat (limited to 'lib')
-rw-r--r--lib/util/debug.h6
-rw-r--r--lib/util/fault.h5
2 files changed, 8 insertions, 3 deletions
diff --git a/lib/util/debug.h b/lib/util/debug.h
index 67d122f1bc..a8a0d69a0f 100644
--- a/lib/util/debug.h
+++ b/lib/util/debug.h
@@ -20,8 +20,8 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef _DEBUG_H
-#define _DEBUG_H
+#ifndef _SAMBA_DEBUG_H
+#define _SAMBA_DEBUG_H
#include <stdbool.h>
#include <stddef.h>
@@ -263,4 +263,4 @@ typedef void (*debug_callback_fn)(void *private_ptr, int level, const char *msg)
*/
void debug_set_callback(void *private_ptr, debug_callback_fn fn);
-#endif
+#endif /* _SAMBA_DEBUG_H */
diff --git a/lib/util/fault.h b/lib/util/fault.h
index 98a24a3470..aa10a71282 100644
--- a/lib/util/fault.h
+++ b/lib/util/fault.h
@@ -24,11 +24,15 @@
#include <sys/types.h>
#include "attr.h"
+
+#ifndef DEBUG
#include "debug.h"
+#endif /* DEBUG */
/**
* assert macros
*/
+#ifdef _SAMBA_DEBUG_H
#define SMB_ASSERT(b) \
do { \
if (!(b)) { \
@@ -37,6 +41,7 @@ do { \
smb_panic("assert failed: " #b); \
} \
} while(0)
+#endif /* _SAMBA_DEBUG_H */
extern const char *panic_action;