mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
Fix #188: unbound-control.c:882:6: error: 'execlp' is unavailable: not available on tvOS
This commit is contained in:
parent
10e5ab2c5f
commit
39c18add57
2 changed files with 12 additions and 0 deletions
|
|
@ -399,6 +399,9 @@ PKG_PROG_PKG_CONFIG
|
||||||
# Checks for header files.
|
# Checks for header files.
|
||||||
AC_CHECK_HEADERS([stdarg.h stdbool.h netinet/in.h netinet/tcp.h sys/param.h sys/socket.h sys/un.h sys/uio.h sys/resource.h arpa/inet.h syslog.h netdb.h sys/wait.h pwd.h glob.h grp.h login_cap.h winsock2.h ws2tcpip.h endian.h sys/endian.h libkern/OSByteOrder.h sys/ipc.h sys/shm.h],,, [AC_INCLUDES_DEFAULT])
|
AC_CHECK_HEADERS([stdarg.h stdbool.h netinet/in.h netinet/tcp.h sys/param.h sys/socket.h sys/un.h sys/uio.h sys/resource.h arpa/inet.h syslog.h netdb.h sys/wait.h pwd.h glob.h grp.h login_cap.h winsock2.h ws2tcpip.h endian.h sys/endian.h libkern/OSByteOrder.h sys/ipc.h sys/shm.h],,, [AC_INCLUDES_DEFAULT])
|
||||||
|
|
||||||
|
# Check for Apple header. This uncovers TARGET_OS_IPHONE, TARGET_OS_TV or TARGET_OS_WATCH
|
||||||
|
AC_CHECK_HEADERS([TargetConditionals.h])
|
||||||
|
|
||||||
# check for types.
|
# check for types.
|
||||||
# Using own tests for int64* because autoconf builtin only give 32bit.
|
# Using own tests for int64* because autoconf builtin only give 32bit.
|
||||||
AC_CHECK_TYPE(int8_t, signed char)
|
AC_CHECK_TYPE(int8_t, signed char)
|
||||||
|
|
|
||||||
|
|
@ -74,6 +74,10 @@
|
||||||
#include <sys/un.h>
|
#include <sys/un.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TARGETCONDITIONAL_H
|
||||||
|
#include <TargetConditional.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
static void usage(void) ATTR_NORETURN;
|
static void usage(void) ATTR_NORETURN;
|
||||||
static void ssl_err(const char* s) ATTR_NORETURN;
|
static void ssl_err(const char* s) ATTR_NORETURN;
|
||||||
static void ssl_path_err(const char* s, const char *path) ATTR_NORETURN;
|
static void ssl_path_err(const char* s, const char *path) ATTR_NORETURN;
|
||||||
|
|
@ -879,11 +883,16 @@ int main(int argc, char* argv[])
|
||||||
if(argc == 0)
|
if(argc == 0)
|
||||||
usage();
|
usage();
|
||||||
if(argc >= 1 && strcmp(argv[0], "start")==0) {
|
if(argc >= 1 && strcmp(argv[0], "start")==0) {
|
||||||
|
#if defined(TARGET_OS_TV) || defined(TARGET_OS_WATCH)
|
||||||
|
fatal_exit("could not exec unbound: %s",
|
||||||
|
strerror(ENOSYS));
|
||||||
|
#else
|
||||||
if(execlp("unbound", "unbound", "-c", cfgfile,
|
if(execlp("unbound", "unbound", "-c", cfgfile,
|
||||||
(char*)NULL) < 0) {
|
(char*)NULL) < 0) {
|
||||||
fatal_exit("could not exec unbound: %s",
|
fatal_exit("could not exec unbound: %s",
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
if(argc >= 1 && strcmp(argv[0], "stats_shm")==0) {
|
if(argc >= 1 && strcmp(argv[0], "stats_shm")==0) {
|
||||||
print_stats_shm(cfgfile);
|
print_stats_shm(cfgfile);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue