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

Alin Gabriel Serdean aserdean at ovn.org
Wed Aug 1 12:55:07 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: 3ec06ea9c668 ("ovn-nbctl: Initial support for daemon mode.")

Signed-off-by: Alin Gabriel Serdean <aserdean at ovn.org>
Acked-by: Ben Pfaff <blp at ovn.org>
---
v2: Change commit message.
---
 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