From 6c4cdbe8916ad4782058847358404bc005c5d908 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sun, 3 Jun 2012 15:30:15 +1000 Subject: [PATCH] s3-libnetapi: Cope with popt versions without POPT_TABLEEND --- source3/lib/netapi/examples/common.h | 4 ++++ source3/lib/netapi/tests/common.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/source3/lib/netapi/examples/common.h b/source3/lib/netapi/examples/common.h index 85df51d86830..917698c9563b 100644 --- a/source3/lib/netapi/examples/common.h +++ b/source3/lib/netapi/examples/common.h @@ -7,5 +7,9 @@ void popt_common_callback(poptContext con, extern struct poptOption popt_common_netapi_examples[]; +#ifndef POPT_TABLEEND +#define POPT_TABLEEND { NULL, '\0', 0, 0, 0, NULL, NULL } +#endif + #define POPT_COMMON_LIBNETAPI_EXAMPLES { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_netapi_examples, 0, "Common samba netapi example options:", NULL }, diff --git a/source3/lib/netapi/tests/common.h b/source3/lib/netapi/tests/common.h index 7e05aaf65762..fcbdad14b74a 100644 --- a/source3/lib/netapi/tests/common.h +++ b/source3/lib/netapi/tests/common.h @@ -28,6 +28,10 @@ extern struct poptOption popt_common_netapi_examples[]; #define POPT_COMMON_LIBNETAPI_EXAMPLES { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_netapi_examples, 0, "Common samba netapi example options:", NULL }, +#ifndef POPT_TABLEEND +#define POPT_TABLEEND { NULL, '\0', 0, 0, 0, NULL, NULL } +#endif + NET_API_STATUS test_netuseradd(const char *hostname, const char *username); -- 2.34.1