Fix LDB module initialization when using external ldb.
authorJelmer Vernooij <jelmer@samba.org>
Sat, 10 May 2008 23:53:11 +0000 (01:53 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Sat, 10 May 2008 23:53:11 +0000 (01:53 +0200)
(This used to be commit b7b4aff8b52742d69526dc0ef5da2fe3c05e3af8)

source4/build/smb_build/makefile.pm
source4/ntvfs/sysdep/sys_lease.c

index 495c8fb967f936049ad25e4a800db4e4b9480a23..16709aef4144b46fe62e06d09021320d5007d060 100644 (file)
@@ -127,7 +127,7 @@ sub SharedModule($$)
        $self->_prepare_list($ctx, "DEPEND_LIST");
        $self->_prepare_list($ctx, "LINK_FLAGS");
 
-       if (defined($ctx->{INIT_FUNCTION}) and $ctx->{INIT_FUNCTION_TYPE} =~ /\(\*\)/) {
+       if (defined($ctx->{INIT_FUNCTION}) and $ctx->{INIT_FUNCTION_TYPE} =~ /\(\*\)/ and not ($ctx->{INIT_FUNCTION} =~ /\(/)) {
                $self->output("\$($ctx->{NAME}_OBJ_FILES): CFLAGS+=-D$ctx->{INIT_FUNCTION}=init_module\n");
        }
 
index e6b11c450aba4d583744bc2f06a9715c07979091..a0322bbcc1adcfce448bd6bdebc3a5e5b2a57707 100644 (file)
@@ -28,7 +28,6 @@
 #include "lib/events/events.h"
 #include "lib/util/dlinklist.h"
 #include "param/param.h"
-#include "build.h"
 
 /* list of registered backends */
 static struct sys_lease_ops *backends;
@@ -109,6 +108,10 @@ _PUBLIC_ NTSTATUS sys_lease_register(const struct sys_lease_ops *backend)
        return NT_STATUS_OK;
 }
 
+#ifndef STATIC_sys_lease_MODULES 
+#define STATIC_sys_lease_MODULES NULL
+#endif
+
 _PUBLIC_ NTSTATUS sys_lease_init(void)
 {
        static bool initialized = false;