[vlc-devel] [PATCH] cachegen: Quick & dirty fix whtn building without getopt

Steve Lhomme robux4 at videolabs.io
Sat Jan 30 09:26:30 CET 2016


From: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

---
 bin/cachegen.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/bin/cachegen.c b/bin/cachegen.c
index 4b1cc57..549cffe 100644
--- a/bin/cachegen.c
+++ b/bin/cachegen.c
@@ -51,6 +51,7 @@ int main (int argc, char *argv[])
 #ifdef _WIN32
     SetErrorMode(SEM_FAILCRITICALERRORS);
 #endif
+#ifdef HAVE_GETOPT_H
     static const struct option opts[] =
     {
         { "help",       no_argument,       NULL, 'h' },
@@ -73,6 +74,10 @@ int main (int argc, char *argv[])
                 usage (argv[0]);
                 return 1;
         }
+#else
+    int optind = 1;
+    bool force = true;
+#endif
 
     for (int i = optind; i < argc; i++)
     {
-- 
2.6.0.windows.1



More information about the vlc-devel mailing list