build: Conditionalize bsd_getopt() on macOS

The system library provides a getopt() with BSD semantics.
This commit is contained in:
Guillem Jover
2023-04-18 03:58:24 +02:00
parent c12068179c
commit 6385ccc977
3 changed files with 11 additions and 1 deletions

View File

@@ -47,6 +47,7 @@
#endif
__BEGIN_DECLS
#if !defined(__APPLE__)
extern int optreset;
#ifdef LIBBSD_OVERLAY
@@ -55,6 +56,7 @@ extern int optreset;
#endif
int bsd_getopt(int argc, char * const argv[], const char *shortopts);
#endif
mode_t getmode(const void *set, mode_t mode);
void *setmode(const char *mode_str);