From 4771f6bccca060fcdceb89205740c94756733df5 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Thu, 29 Aug 2019 23:56:17 -0700 Subject: [PATCH] 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 Acked-by: Eric Engestrom --- src/util/u_string.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 * -- 2.30.2