From: Vinson Lee Date: Fri, 30 Aug 2019 06:56:17 +0000 (-0700) Subject: util: Define strchrnul on macOS. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4771f6bccca060fcdceb89205740c94756733df5;p=mesa.git 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 --- 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 *