From: Anoop C S Date: Thu, 27 Dec 2018 12:49:42 +0000 (+0530) Subject: s4/messaging: Fix undefined reference in linking libMESSAGING-samba4.so X-Git-Tag: samba-4.10.1~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e769bd6608951e80bcc3fac7b4808194f22bbd36;p=thirdparty%2Fsamba.git s4/messaging: Fix undefined reference in linking libMESSAGING-samba4.so Early check for DEVELOPER or ENABLE_SELFTEST configure options inside messaging_handlers.c leaves us with the following undefined reference linkage error: [1315/3712] Linking bin/default/source4/lib/messaging/libMESSAGING-samba4.so /usr/bin/ld: source4/lib/messaging/messaging.c.4.o: in function `imessaging_init_internal': /root/samba.git/bin/default/../../source4/lib/messaging/messaging.c:472: undefined reference to `imessaging_register_extra_handlers' collect2: error: ld returned 1 exit status This happened due to failure in including "includes.h" before checking the above mentioned configure options. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13854 Signed-off-by: Anoop C S Reviewed-by: Andreas Schneider Reviewed-by: Andrew Bartlett (cherry picked from commit 08ba013a2b8b2cf9fc17fdcb3d107e1434709036) --- diff --git a/source4/lib/messaging/messaging_handlers.c b/source4/lib/messaging/messaging_handlers.c index aee7b66e306..342157d5b4a 100644 --- a/source4/lib/messaging/messaging_handlers.c +++ b/source4/lib/messaging/messaging_handlers.c @@ -22,13 +22,13 @@ along with this program. If not, see . */ -#if defined(DEVELOPER) || defined(ENABLE_SELFTEST) - #include "includes.h" #include "lib/util/server_id.h" #include "messaging/messaging.h" #include "messaging/messaging_internal.h" +#if defined(DEVELOPER) || defined(ENABLE_SELFTEST) + /* * Inject a fault into the currently running process */