[ovs-dev] [PATCH] Add opterr and optopt to Windows headers

Alin Gabriel Serdean aserdean at ovn.org
Tue Jul 31 12:08:13 UTC 2018

Until now we only had optind defined in the header.

Since we are using the BSD getopt variant add opterr and optopt.

Fixes: current Windows build failures.

Signed-off-by: Alin Gabriel Serdean <aserdean at ovn.org>
 include/windows/getopt.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/windows/getopt.h b/include/windows/getopt.h
index 9b526ff73..fc43be868 100644
--- a/include/windows/getopt.h
+++ b/include/windows/getopt.h
@@ -33,7 +33,7 @@
 #include <unistd.h>
 extern char *optarg;
-extern int optind;
+extern int optind, opterr, optopt;
  * Gnu like getopt_long() and BSD4.4 getsubopt()/optreset extensions

More information about the dev mailing list