Hi all,
I've attached a patch that fixes a build error for osmo-fl2k under mingw. It seems that __argc and __argv are #defined by mingw as function calls. The patch simply removes the underscores in the argument names.
Some of the errors:
osmo-fl2k/src/fl2k_fm.c: In function 'main': osmo-fl2k/src/fl2k_fm.c:455:35: error: passing argument 1 of 'getopt_long' makes pointer from integer without a cast [-Wint- conversion] 455 | opt = getopt_long(argc, argv, "d:c:f:i:s:", long_options, &option_index); | ^~~~ | | | int In file included from /usr/x86_64-w64-mingw32/sys- root/mingw/include/_mingw.h:10, from /usr/x86_64-w64-mingw32/sys- root/mingw/include/corecrt.h:10, from /usr/x86_64-w64-mingw32/sys- root/mingw/include/corecrt_stdio_config.h:10, from /usr/x86_64-w64-mingw32/sys- root/mingw/include/stdio.h:9, from osmo-fl2k/src/fl2k_fm.c:26: osmo-fl2k/src/getopt/getopt.h:151:29: note: expected 'int *' but argument is of type 'int' 151 | extern int getopt_long (int __argc, char *const *__argv, const char *__shortopts, | ^ osmo-fl2k/src/fl2k_fm.c:455:41: error: passing argument 2 of 'getopt_long' from incompatible pointer type [-Wincompatible-pointer- types] 455 | opt = getopt_long(argc, argv, "d:c:f:i:s:", long_options, &option_index); | ^~~~ | | | char ** In file included from osmo-fl2k/src/fl2k_fm.c:27: osmo-fl2k/src/getopt/getopt.h:151:50: note: expected 'char * const** (*)()' but argument is of type 'char **' 151 | extern int getopt_long (int __argc, char *const *__argv, const char *__shortopts, | ^
Thanks, -Phil