HAVE_GETOPT_LONG is never defined here and seems to be obsolete. Use _GNU_SOURCE here as getopt_long is a GNU extension. This fixes long options to work properly. Signed-off-by: Stefan Schmidt <stefan@xxxxxxxxxxxxxxx> --- wpan-ping/wpan-ping.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wpan-ping/wpan-ping.c b/wpan-ping/wpan-ping.c index 7b53373..9f01ae6 100644 --- a/wpan-ping/wpan-ping.c +++ b/wpan-ping/wpan-ping.c @@ -69,7 +69,7 @@ struct sockaddr_ieee802154 { struct ieee802154_addr_sa addr; }; -#ifdef HAVE_GETOPT_LONG +#ifdef _GNU_SOURCE static const struct option perf_long_opts[] = { { "daemon", no_argument, NULL, 'd' }, { "address", required_argument, NULL, 'a' }, @@ -441,7 +441,7 @@ int main(int argc, char *argv[]) { } while (1) { -#ifdef HAVE_GETOPT_LONG +#ifdef _GNU_SOURCE int opt_idx = -1; c = getopt_long(argc, argv, "a:ec:s:i:dvh", perf_long_opts, &opt_idx); #else -- 2.4.3 -- To unsubscribe from this list: send the line "unsubscribe linux-wpan" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html