From f451dd482d1220cb520bbf2cc210c458c25dca26 Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=BCnther=20Deschner?= Date: Fri, 29 May 2009 19:22:43 +0200 Subject: [PATCH] s4-smbtorture: fix the build w/o libnetapi. 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 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source4/torture/torture.c b/source4/torture/torture.c index de4fd591b9d..d80acffa0dc 100644 --- a/source4/torture/torture.c +++ b/source4/torture/torture.c @@ -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); -- 2.34.1