Code

test GNU_SOURCE and include features.h if present to clear warning about asprintf...
[nagiosplug.git] / plugins / check_fping.c
index 8887afe8eeaf647fe695da34b07d244aac18afdd..ac203f523d3a646cd8e2dd11f54f098857cd0426 100644 (file)
@@ -202,7 +202,6 @@ process_arguments (int argc, char **argv)
        int c;
        char *rv[2];
 
-#ifdef HAVE_GETOPT_H
        int option_index = 0;
        static struct option long_options[] = {
                {"hostname", required_argument, 0, 'H'},
@@ -215,7 +214,6 @@ process_arguments (int argc, char **argv)
                {"help", no_argument, 0, 'h'},
                {0, 0, 0, 0}
        };
-#endif
 
        rv[PL] = NULL;
        rv[RTA] = NULL;
@@ -231,12 +229,7 @@ process_arguments (int argc, char **argv)
        }
 
        while (1) {
-#ifdef HAVE_GETOPT_H
-               c =
-                       getopt_long (argc, argv, "+hVvH:c:w:b:n:", long_options, &option_index);
-#else
-               c = getopt (argc, argv, "+hVvH:c:w:b:n:");
-#endif
+               c = getopt_long (argc, argv, "+hVvH:c:w:b:n:", long_options, &option_index);
 
                if (c == -1 || c == EOF || c == 1)
                        break;