summaryrefslogtreecommitdiffstats
path: root/plugins/check_mrtg.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/check_mrtg.c')
-rw-r--r--plugins/check_mrtg.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/plugins/check_mrtg.c b/plugins/check_mrtg.c
index e26e2e66..095dcbc8 100644
--- a/plugins/check_mrtg.c
+++ b/plugins/check_mrtg.c
@@ -214,7 +214,6 @@ process_arguments (int argc, char **argv)
214{ 214{
215 int c; 215 int c;
216 216
217#ifdef HAVE_GETOPT_H
218 int option_index = 0; 217 int option_index = 0;
219 static struct option long_options[] = { 218 static struct option long_options[] = {
220 {"logfile", required_argument, 0, 'F'}, 219 {"logfile", required_argument, 0, 'F'},
@@ -230,7 +229,6 @@ process_arguments (int argc, char **argv)
230 {"help", no_argument, 0, 'h'}, 229 {"help", no_argument, 0, 'h'},
231 {0, 0, 0, 0} 230 {0, 0, 0, 0}
232 }; 231 };
233#endif
234 232
235 if (argc < 2) 233 if (argc < 2)
236 return ERROR; 234 return ERROR;
@@ -245,13 +243,8 @@ process_arguments (int argc, char **argv)
245 } 243 }
246 244
247 while (1) { 245 while (1) {
248#ifdef HAVE_GETOPT_H 246 c = getopt_long (argc, argv, "hVF:e:a:v:c:w:l:u:", long_options,
249 c =
250 getopt_long (argc, argv, "hVF:e:a:v:c:w:l:u:", long_options,
251 &option_index); 247 &option_index);
252#else
253 c = getopt (argc, argv, "hVF:e:a:v:c:w:l:u:");
254#endif
255 248
256 if (c == -1 || c == EOF) 249 if (c == -1 || c == EOF)
257 break; 250 break;
@@ -370,12 +363,7 @@ void
370print_usage (void) 363print_usage (void)
371{ 364{
372 printf ("Usage:\n" " %s %s\n" 365 printf ("Usage:\n" " %s %s\n"
373#ifdef HAVE_GETOPT_H
374 " %s (-h | --help) for detailed help\n" 366 " %s (-h | --help) for detailed help\n"
375 " %s (-V | --version) for version information\n", 367 " %s (-V | --version) for version information\n",
376#else
377 " %s -h for detailed help\n"
378 " %s -V for version information\n",
379#endif
380 progname, OPTIONS, progname, progname); 368 progname, OPTIONS, progname, progname);
381} 369}