Files
pkgsrc-ng/misc/vfu/patches/patch-al
2016-01-21 23:40:00 +01:00

27 lines
732 B
Plaintext

$NetBSD: patch-al,v 1.2 2014/06/29 19:43:54 dholland Exp $
- use extern "C" around the stuff here (why?)
- sprinkle const to make more modern C++ compilers happier
--- vslib/getopt2.h.orig 2001-10-28 13:53:02.000000000 +0000
+++ vslib/getopt2.h
@@ -15,7 +15,7 @@
/* next line added by <cade@biscom.net> see getopt2.cpp for changes */
#define GETOPT(opts) while((optc = getopt2(argc, argv, opts)) != -1)
-
+extern "C" {
extern char *optarg;
extern int optind;
extern int opterr;
@@ -30,6 +30,8 @@ extern int opterr_report;
/* name changed to getopt2 to avoid library function mismatch */
-int getopt2(int argc, char *argv[], char *optstring);
+int getopt2(int argc, char *argv[], const char *optstring);
+
+}
#endif