diff options
author | Peter Harris <pharris@opentext.com> | 2017-05-09 19:39:47 -0400 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2017-05-10 15:08:27 -0400 |
commit | 0ff2fb128bf35dffaa302f15e9ae004b65ee0827 (patch) | |
tree | c3d65f1e23aa7b7c04e62dfca3a870b8b50615d2 /include/os.h | |
parent | c4c002d1ca80bd69776387dafb9c5bb082c72e48 (diff) |
meson: Detect strlcat/strlcpy/reallocarray in libbsd
If we're linking with libbsd anyway, we might as well use the functions
it provides instead of compiling our replacements.
Signed-off-by: Peter Harris <pharris@opentext.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'include/os.h')
-rw-r--r-- | include/os.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/os.h b/include/os.h index fb09d00c7..e141a6b02 100644 --- a/include/os.h +++ b/include/os.h @@ -54,6 +54,12 @@ SOFTWARE. #ifdef MONOTONIC_CLOCK #include <time.h> #endif +#if defined(HAVE_LIBBSD) && defined(HAVE_REALLOCARRAY) +#include <bsd/stdlib.h> /* for reallocarray */ +#endif +#if defined(HAVE_LIBBSD) && defined(HAVE_STRLCPY) +#include <bsd/string.h> /* for strlcpy, strlcat */ +#endif #define SCREEN_SAVER_ON 0 #define SCREEN_SAVER_OFF 1 |