diff options
-rw-r--r-- | src/amd/common/ac_debug.c | 2 | ||||
-rw-r--r-- | src/gallium/auxiliary/pipe-loader/pipe_loader.c | 2 | ||||
-rw-r--r-- | src/util/u_string.h | 7 |
3 files changed, 4 insertions, 7 deletions
diff --git a/src/amd/common/ac_debug.c b/src/amd/common/ac_debug.c index 1632106fdb9..36a01fd8bf7 100644 --- a/src/amd/common/ac_debug.c +++ b/src/amd/common/ac_debug.c @@ -542,7 +542,7 @@ static void format_ib_output(FILE *f, char *out) if (indent) print_spaces(f, indent); - char *end = util_strchrnul(out, '\n'); + char *end = strchrnul(out, '\n'); fwrite(out, end - out, 1, f); fputc('\n', f); /* always end with a new line */ if (!*end) diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader.c b/src/gallium/auxiliary/pipe-loader/pipe_loader.c index 29718a2aa20..b435486903c 100644 --- a/src/gallium/auxiliary/pipe-loader/pipe_loader.c +++ b/src/gallium/auxiliary/pipe-loader/pipe_loader.c @@ -138,7 +138,7 @@ pipe_loader_find_module(const char *driver_name, int len, ret; for (next = library_paths; *next; library_paths = next + 1) { - next = util_strchrnul(library_paths, ':'); + next = strchrnul(library_paths, ':'); len = next - library_paths; if (len) diff --git a/src/util/u_string.h b/src/util/u_string.h index 751ae909e1b..b43c42650e1 100644 --- a/src/util/u_string.h +++ b/src/util/u_string.h @@ -50,12 +50,9 @@ extern "C" { #endif -#ifdef _GNU_SOURCE - -#define util_strchrnul strchrnul - -#else +#ifndef _GNU_SOURCE +#define strchrnul util_strchrnul static inline char * util_strchrnul(const char *s, char c) { |