From 01dbeb3084d714bbd001ff9d03b9de542e8cdf58 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Mon, 27 Feb 2023 17:07:52 +1100 Subject: 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@ --- openbsd-compat/getopt.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'openbsd-compat/getopt.h') 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 *); -- cgit v1.2.3