summaryrefslogtreecommitdiffstats
path: root/src/util/u_string.h
diff options
context:
space:
mode:
authorVinson Lee <[email protected]>2019-08-29 23:56:17 -0700
committerVinson Lee <[email protected]>2019-08-31 13:26:10 -0700
commit4771f6bccca060fcdceb89205740c94756733df5 (patch)
treec5fd5d2e2560c35793ddb994c1ec6607374ba300 /src/util/u_string.h
parent52af1427c6d248829130ce25b86cd27a31d34633 (diff)
util: Define strchrnul on macOS.
strchrnul is not available on macOS. pipe_loader.c:141:14: error: implicit declaration of function 'strchrnul' is invalid in C99 [-Werror,-Wimplicit-function-declaration] next = strchrnul(library_paths, ':'); ^ Signed-off-by: Vinson Lee <[email protected]> Acked-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'src/util/u_string.h')
-rw-r--r--src/util/u_string.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/u_string.h b/src/util/u_string.h
index 361dcb41e2b..cd21f9d1af1 100644
--- a/src/util/u_string.h
+++ b/src/util/u_string.h
@@ -50,7 +50,7 @@
extern "C" {
#endif
-#ifndef _GNU_SOURCE
+#if !defined(_GNU_SOURCE) || defined(__APPLE__)
#define strchrnul util_strchrnul
static inline char *