summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2019-11-07 20:43:27 +0100
committerBoris Faure <billiob@gmail.com>2019-11-07 20:43:47 +0100
commit02f41733879ffb650e4dd6e96ea49c5acbe10296 (patch)
tree84b05aba64c69420757b506b4aa13e4530e4673a
parent6f8997d194f17cac112b4770ee055f16cadf42e7 (diff)
build: detect whether there is strchrnul
This should help compiling on macosx
-rw-r--r--meson.build4
-rw-r--r--src/bin/termptyesc.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index 3932ecc..dbac9a7 100644
--- a/meson.build
+++ b/meson.build
@@ -78,6 +78,10 @@ if cc.has_function('mkstemps')
78 config_data.set('HAVE_MKSTEMPS', 1) 78 config_data.set('HAVE_MKSTEMPS', 1)
79endif 79endif
80 80
81if cc.has_function('strchrnul')
82 config_data.set('HAVE_STRCHRNUL', 1)
83endif
84
81url_head_code = '''#include <Ecore_Con.h> 85url_head_code = '''#include <Ecore_Con.h>
82int main(void) { ecore_con_url_head(NULL); return 0; } 86int main(void) { ecore_con_url_head(NULL); return 0; }
83''' 87'''
diff --git a/src/bin/termptyesc.c b/src/bin/termptyesc.c
index 256c819..25da608 100644
--- a/src/bin/termptyesc.c
+++ b/src/bin/termptyesc.c
@@ -3418,7 +3418,7 @@ _eina_unicode_to_hex(Eina_Unicode u)
3418 return -1; 3418 return -1;
3419} 3419}
3420 3420
3421#if defined(__OpenBSD__) 3421#if !defined(HAVE_STRCHRNUL)
3422char * 3422char *
3423strchrnul(const char *s, int c) 3423strchrnul(const char *s, int c)
3424{ 3424{