summaryrefslogtreecommitdiff
path: root/src/lib/eina
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@profusion.mobi>2017-01-26 15:35:35 -0200
committerGustavo Sverzut Barbieri <barbieri@profusion.mobi>2017-01-26 15:53:14 -0200
commit85a095f0a88ef803e1eb98664b83116e2614c4ce (patch)
treefa8ee37c671dc1b041d7c9bec5c4ba992b8b5574 /src/lib/eina
parent4ed139a49cedf3f6e85d6f631a56bb7e4e416cc6 (diff)
cmake: fix strlcpy() detection and usage.
Linux usually ship with strlcpy(), but it's inside bsd/string.h and needs -lbsd. On BSD it's inside string.h and libc.
Diffstat (limited to 'src/lib/eina')
-rw-r--r--src/lib/eina/CMakeLists.txt4
-rw-r--r--src/lib/eina/eina_str.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/eina/CMakeLists.txt b/src/lib/eina/CMakeLists.txt
index bd23e782e8..4c5ee50faa 100644
--- a/src/lib/eina/CMakeLists.txt
+++ b/src/lib/eina/CMakeLists.txt
@@ -22,6 +22,10 @@ set(LIBRARIES
22 rt 22 rt
23) 23)
24 24
25if(HAVE_BSD_STRING_H)
26 list(APPEND LIBRARIES bsd)
27endif()
28
25set(PUBLIC_HEADERS 29set(PUBLIC_HEADERS
26 Eina.h 30 Eina.h
27 eina_accessor.h 31 eina_accessor.h
diff --git a/src/lib/eina/eina_str.c b/src/lib/eina/eina_str.c
index dcf93c3ca4..b9f0c034ff 100644
--- a/src/lib/eina/eina_str.c
+++ b/src/lib/eina/eina_str.c
@@ -28,6 +28,10 @@
28#include <limits.h> 28#include <limits.h>
29#include <ctype.h> 29#include <ctype.h>
30 30
31#ifdef HAVE_BSD_STRING_H
32# include <bsd/string.h>
33#endif
34
31#ifdef HAVE_ICONV 35#ifdef HAVE_ICONV
32# include <errno.h> 36# include <errno.h>
33# include <iconv.h> 37# include <iconv.h>