From 9bc30967d29dd13441eca2a003048ee7975181f7 Mon Sep 17 00:00:00 2001 From: Felipe Gasper Date: Mon, 3 Aug 2020 14:37:00 -0400 Subject: [PATCH] Make tvOS & watchOS checks verify truthiness as well as definedness. --- daemon/unbound.c | 2 +- libunbound/libworker.c | 2 +- smallapp/unbound-control.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/daemon/unbound.c b/daemon/unbound.c index 3f96603c4..cd0fd69f2 100644 --- a/daemon/unbound.c +++ b/daemon/unbound.c @@ -92,7 +92,7 @@ #include #endif -#if defined(TARGET_OS_TV) || defined(TARGET_OS_WATCH) +#if (defined(TARGET_OS_TV) && TARGET_OS_TV) || (defined(TARGET_OS_WATCH) && TARGET_OS_WATCH) #undef HAVE_FORK #endif diff --git a/libunbound/libworker.c b/libunbound/libworker.c index 44b8d7905..bd42462e1 100644 --- a/libunbound/libworker.c +++ b/libunbound/libworker.c @@ -78,7 +78,7 @@ #include #endif -#if defined(TARGET_OS_TV) || defined(TARGET_OS_WATCH) +#if (defined(TARGET_OS_TV) && TARGET_OS_TV) || (defined(TARGET_OS_WATCH) && TARGET_OS_WATCH) #undef HAVE_FORK #endif diff --git a/smallapp/unbound-control.c b/smallapp/unbound-control.c index c2b42e951..4662c7cb6 100644 --- a/smallapp/unbound-control.c +++ b/smallapp/unbound-control.c @@ -886,7 +886,7 @@ int main(int argc, char* argv[]) if(argc == 0) usage(); if(argc >= 1 && strcmp(argv[0], "start")==0) { -#if defined(TARGET_OS_TV) || defined(TARGET_OS_WATCH) +#if (defined(TARGET_OS_TV) && TARGET_OS_TV) || (defined(TARGET_OS_WATCH) && TARGET_OS_WATCH) fatal_exit("could not exec unbound: %s", strerror(ENOSYS)); #else