[PATCH 6/8] Fix redundant declaration with getopt.h

Rene Kita <[email protected]>
Newsgroups gmane.mail.mutt.devel
Message-ID <[email protected]>
---
 main.c       | 2 ++
 pgppubring.c | 6 +++---
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/main.c b/main.c
index 9c97dbc2..376d9407 100644
--- a/main.c
+++ b/main.c
@@ -658,8 +658,10 @@ int main(int argc, char **argv, char **environ)
   int explicit_folder = 0;
   int dump_variables = 0;
   int edit_infile = 0;
+#ifndef HAVE_GETOPT_H
   extern char *optarg;
   extern int optind;
+#endif
   int double_dash = argc, nargc = 1;
   int exit_code = 1;
   const char *exit_endwin_msg = NULL;
diff --git a/pgppubring.c b/pgppubring.c
index 1d447252..43b8b978 100644
--- a/pgppubring.c
+++ b/pgppubring.c
@@ -45,11 +45,11 @@
 #include <time.h>
 #ifdef HAVE_GETOPT_H
 # include <getopt.h>
-#endif
-#include <errno.h>
-
+#else
 extern char *optarg;
 extern int optind;
+#endif
+#include <errno.h>
 
 #include "sha1.h"
 #include "md5.h"
-- 
2.51.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.