s3-libnetapi: Cope with popt versions without POPT_TABLEEND
authorAndrew Bartlett <abartlet@samba.org>
Sun, 3 Jun 2012 05:30:15 +0000 (15:30 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Sun, 3 Jun 2012 05:30:15 +0000 (15:30 +1000)
source3/lib/netapi/examples/common.h
source3/lib/netapi/tests/common.h

index 85df51d8683076abaeca010e0a1261f3c0ab6ce2..917698c9563b93f825d7e52666a2a415a6bdd08d 100644 (file)
@@ -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 },
 
index 7e05aaf6576229d0a88c3ec2d1bee78250539664..fcbdad14b74ab1abd7719ffb6d65fd22fd78add5 100644 (file)
@@ -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);