From 02f41733879ffb650e4dd6e96ea49c5acbe10296 Mon Sep 17 00:00:00 2001 From: Boris Faure Date: Thu, 7 Nov 2019 20:43:27 +0100 Subject: [PATCH] build: detect whether there is strchrnul This should help compiling on macosx --- meson.build | 4 ++++ src/bin/termptyesc.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 3932eccf..dbac9a7f 100644 --- a/meson.build +++ b/meson.build @@ -78,6 +78,10 @@ if cc.has_function('mkstemps') config_data.set('HAVE_MKSTEMPS', 1) endif +if cc.has_function('strchrnul') + config_data.set('HAVE_STRCHRNUL', 1) +endif + url_head_code = '''#include int main(void) { ecore_con_url_head(NULL); return 0; } ''' diff --git a/src/bin/termptyesc.c b/src/bin/termptyesc.c index 256c8190..25da6080 100644 --- a/src/bin/termptyesc.c +++ b/src/bin/termptyesc.c @@ -3418,7 +3418,7 @@ _eina_unicode_to_hex(Eina_Unicode u) return -1; } -#if defined(__OpenBSD__) +#if !defined(HAVE_STRCHRNUL) char * strchrnul(const char *s, int c) {