summaryrefslogtreecommitdiffstats
path: root/openbsd-compat/getopt.h
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2023-02-27 17:07:52 +1100
committerDamien Miller <djm@mindrot.org>2023-02-27 17:10:12 +1100
commit01dbeb3084d714bbd001ff9d03b9de542e8cdf58 (patch)
tree50237240ebea54abc66df90c42acf3690e20faf0 /openbsd-compat/getopt.h
parenteb88d07c43afe407094e7d609248d85a15e148ef (diff)
avoid clash between for getopt's struct option
Since we don't use getopt_long() nothing outside the getopt() implementation itself uses this structure, so move it into the source to remove it from visibility and clashes with libc's ok dtucker@
Diffstat (limited to 'openbsd-compat/getopt.h')
-rw-r--r--openbsd-compat/getopt.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/openbsd-compat/getopt.h b/openbsd-compat/getopt.h
index 8eb12447..65c8bc7f 100644
--- a/openbsd-compat/getopt.h
+++ b/openbsd-compat/getopt.h
@@ -40,6 +40,7 @@
#define required_argument 1
#define optional_argument 2
+#if 0
struct option {
/* name of long option */
const char *name;
@@ -58,6 +59,8 @@ int getopt_long(int, char * const *, const char *,
const struct option *, int *);
int getopt_long_only(int, char * const *, const char *,
const struct option *, int *);
+#endif
+
#ifndef _GETOPT_DEFINED_
#define _GETOPT_DEFINED_
int getopt(int, char * const *, const char *);