]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
lib/util: Avoid collision which alread defined consumer DEBUG macro.
authorAndreas Schneider <asn@samba.org>
Thu, 8 Jan 2015 09:24:36 +0000 (10:24 +0100)
committerKarolin Seeger <kseeger@samba.org>
Thu, 15 Jan 2015 12:55:09 +0000 (13:55 +0100)
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>
(cherry picked from commit 87c176563baea3458c5322f1e3dfae6cf074b4b4)
Signed-off-by: Andreas Schneider <asn@samba.org>
lib/util/debug.h
lib/util/fault.h

index 27c319b760d0a02063f6e7e8210e7c72171c5225..fa07d4088bd3a4bf4cae4ee6268573edbfd4e2d1 100644 (file)
@@ -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>
@@ -262,4 +262,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 */
index 98a24a34709311d826b0de9d6d4ea1ee1d886478..aa10a71282e921973c51ba2f86375f652e912ada 100644 (file)
 #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;