s4-smbtorture: fix the build w/o libnetapi.
authorGünther Deschner <gd@samba.org>
Fri, 29 May 2009 17:22:43 +0000 (19:22 +0200)
committerGünther Deschner <gd@samba.org>
Fri, 29 May 2009 17:25:44 +0000 (19:25 +0200)
This is surely the wrong fix, but I could not figure out why the samba4 build
system adds the init function although the m4 macro had switched off the torture
libnetapi subsystem when the headers and libs were not found.

Can one of the samba4 build gurus please have a look ?

Guenther

source4/torture/torture.c

index de4fd591b9d939b41dd7193ba772192d645a642a..d80acffa0dc1bbdb024bcc90f47adaa6f111e427 100644 (file)
@@ -45,6 +45,12 @@ bool torture_register_suite(struct torture_suite *suite)
        return torture_suite_add_suite(torture_root, suite);
 }
 
+#ifndef HAVE_NETAPI_H
+NTSTATUS torture_libnetapi_init(void)
+{
+       return NT_STATUS_OK;
+}
+#endif
 
 _PUBLIC_ int torture_init(void)
 {
@@ -57,7 +63,9 @@ _PUBLIC_ int torture_init(void)
        extern NTSTATUS torture_rpc_init(void);
        extern NTSTATUS torture_smb2_init(void);
        extern NTSTATUS torture_net_init(void);
+#ifdef HAVE_NETAPI_H
        extern NTSTATUS torture_libnetapi_init(void);
+#endif
        extern NTSTATUS torture_raw_init(void);
        extern NTSTATUS torture_unix_init(void);
        extern NTSTATUS torture_winbind_init(void);