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

@@ -75,7 +75,6 @@ EXTRA_libbsd_la_DEPENDENCIES += \
# EOL
endif
libbsd_la_SOURCES = \
bsd_getopt.c \
closefrom.c \
dehumanize_number.c \
err.c \
@@ -116,6 +115,12 @@ libbsd_la_SOURCES = \
wcslcpy.c \
# EOL
if NEED_BSD_GETOPT
libbsd_la_SOURCES += \
bsd_getopt.c \
# EOL
endif
if NEED_ARC4RANDOM
if !HAVE_GETENTROPY
libbsd_la_SOURCES += \