aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncaen <mail@duncano.de>2017-05-25 19:58:46 +0200
committerDuncaen <mail@duncano.de>2017-05-25 20:07:08 +0200
commitb0654e4dcd86c78505bacc8b8f4eb70fa603c958 (patch)
tree003df0ec47907fa8128ff141c920283388e18e3a
parent2b8de114576da4f0aba3350694ae1ce5f945f2bb (diff)
downloadlobase-b0654e4dcd86c78505bacc8b8f4eb70fa603c958.tar.gz
include: avoid getopt conflicts
-rw-r--r--include/getopt.h3
-rw-r--r--include/unistd.h3
2 files changed, 6 insertions, 0 deletions
diff --git a/include/getopt.h b/include/getopt.h
index e651d5e..103950f 100644
--- a/include/getopt.h
+++ b/include/getopt.h
@@ -70,6 +70,9 @@ int getopt_long_only(int, char * const *, const char *,
const struct option *, int *);
#ifndef _GETOPT_DEFINED_
#define _GETOPT_DEFINED_
+#define getopt openbsd_getopt
+#define opterr openbsd_opterr
+#define optind openbsd_optind
int getopt(int, char * const *, const char *);
extern char *optarg; /* getopt(3) external variables */
diff --git a/include/unistd.h b/include/unistd.h
index fc45556..fb381e2 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -56,6 +56,9 @@ int pledge(const char *, const char *[]);
#ifndef _GETOPT_DEFINED_
#define _GETOPT_DEFINED_
+#define getopt openbsd_getopt
+#define opterr openbsd_opterr
+#define optind openbsd_optind
int getopt(int, char * const *, const char *);
extern char *optarg; /* getopt(3) external variables */
extern int opterr, optind, optopt, optreset;