diff options
author | pblemel <pblemel@user.github.invalid.com> | 2019-01-11 16:48:53 +0800 |
---|---|---|
committer | Andy Green <andy@warmcat.com> | 2019-01-11 17:14:14 +0800 |
commit | 39e19c85f1aa559a8e991e74bee461046e751eab (patch) | |
tree | 173e9464436381176411a24e1765b244c7523c74 /minimal-examples/api-tests | |
parent | d2a1bbd8aac16a1c37f16acccfce81be6f48a399 (diff) | |
download | libwebsockets-39e19c85f1aa559a8e991e74bee461046e751eab.tar.gz |
qnx: qnx6.5 compatibility
Diffstat (limited to 'minimal-examples/api-tests')
-rw-r--r-- | minimal-examples/api-tests/api-test-fts/main.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/minimal-examples/api-tests/api-test-fts/main.c b/minimal-examples/api-tests/api-test-fts/main.c index bc0123c8..e599d4f1 100644 --- a/minimal-examples/api-tests/api-test-fts/main.c +++ b/minimal-examples/api-tests/api-test-fts/main.c @@ -8,9 +8,12 @@ */ #include <libwebsockets.h> +#if defined(LWS_HAS_GETOPT_LONG) || defined(WIN32) #include <getopt.h> +#endif #include <fcntl.h> +#if defined(LWS_HAS_GETOPT_LONG) || defined(WIN32) static struct option options[] = { { "help", no_argument, NULL, 'h' }, { "createindex", no_argument, NULL, 'c' }, @@ -20,6 +23,7 @@ static struct option options[] = { { "lines", required_argument, NULL, 'l' }, { NULL, 0, 0, 0 } }; +#endif static const char *index_filepath = "/tmp/lws-fts-test-index"; static char filepath[256]; @@ -35,7 +39,11 @@ int main(int argc, char **argv) char buf[16384]; do { +#if defined(LWS_HAS_GETOPT_LONG) || defined(WIN32) n = getopt_long(argc, argv, "hd:i:cfl", options, NULL); +#else + n = getopt(argc, argv, "hd:i:cfl"); +#endif if (n < 0) continue; switch (n) { |