From c46b75a0caeaae563828e100e0ac51dd01ca644f Mon Sep 17 00:00:00 2001 From: Ari Lemmetti Date: Fri, 31 Oct 2014 17:40:18 +0200 Subject: [PATCH] Fixed mingw build error. Modified function declaration in getopt.h. A macro definition adds * in front of __argc and __argv, causing build error with mingw. Renamed them to argc and argv to prevent this. --- src/extras/getopt.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/extras/getopt.h b/src/extras/getopt.h index e2e40daf..fc53e566 100644 --- a/src/extras/getopt.h +++ b/src/extras/getopt.h @@ -147,7 +147,11 @@ extern int getopt (); # endif /* __GNU_LIBRARY__ */ # ifndef __need_getopt -extern int getopt_long (int __argc, char *const *__argv, const char *__shortopts, + +// Notice: Originally argc and argv were named __argc and __argv +// A macro definition added * in front of them both, causing +// build error with mingw. +extern int getopt_long (int argc, char *const *argv, const char *__shortopts, const struct option *__longopts, int *__longind); extern int getopt_long_only (int __argc, char *const *__argv, const char *__shortopts,