summaryrefslogtreecommitdiff
path: root/source4/include
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2015-03-05 11:26:46 +0100
committerJeremy Allison <jra@samba.org>2015-03-11 18:47:22 +0100
commit9643a4b1ef2ada764f454ecc82aa6936217967fc (patch)
tree999d595854cb4efbba9f6d2d568ca39b55e74aa3 /source4/include
parentca598813808c7f06f248e78af302b966f5bbcd93 (diff)
downloadsamba-9643a4b1ef2ada764f454ecc82aa6936217967fc.tar.gz
lib/util: Include DEBUG macro in internal header files before samba_util.h
It's best practice to include external header files before internal header files. In this case internal DEBUG macro cannot be defined and therefore samba version of debug macro will be included in header file "util/fault.h". In file included from example.c:27:0: src/util/util.h:127:0: error: "DEBUG" redefined [-Werror] #define DEBUG(level, format, ...) do { \ ^ In file included from /usr/include/samba-4.0/util/fault.h:29:0, from /usr/include/samba-4.0/samba_util.h:62, from /usr/include/samba-4.0/ndr.h:30, from example.c:24: /usr/include/samba-4.0/util/debug.h:182:0: note: this is the location of the previous definition #define DEBUG( level, body ) \ ^ CC src/providers/ad/libsss_ad_common_la-ad_domain_info.lo cc1: all warnings being treated as errors BUG: https://bugzilla.samba.org/show_bug.cgi?id=11033 Signed-off-by: Lukas Slebodnik <lslebodn@redhat.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Mar 11 18:47:22 CET 2015 on sn-devel-104
Diffstat (limited to 'source4/include')
-rw-r--r--source4/include/includes.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/source4/include/includes.h b/source4/include/includes.h
index 46b158ec08f..5aabb8e670e 100644
--- a/source4/include/includes.h
+++ b/source4/include/includes.h
@@ -57,6 +57,8 @@
#endif
#include "../lib/util/xfile.h"
#include "../lib/util/attr.h"
+
+/* debug.h need to be included before samba_util.h for the macro SMB_ASSERT */
#include "../lib/util/debug.h"
#include "../lib/util/samba_util.h"