diff options
Diffstat (limited to 'utils')
-rw-r--r-- | utils/config.h | 3 | ||||
-rw-r--r-- | utils/utf8.c | 2 | ||||
-rw-r--r-- | utils/utils.c | 1 | ||||
-rw-r--r-- | utils/utils.h | 3 |
4 files changed, 7 insertions, 2 deletions
diff --git a/utils/config.h b/utils/config.h index 2e586974c..deee87150 100644 --- a/utils/config.h +++ b/utils/config.h @@ -24,7 +24,8 @@ /* Try to detect which features the target OS supports */ #define HAVE_STRNDUP -#if defined(__FreeBSD__) || (defined(__SRV4) && defined(__sun)) +#if defined(__FreeBSD__) || (defined(__SRV4) && defined(__sun)) || \ + defined(__APPLE__) /* FreeBSD and Solaris do not have this function, so * we implement it ourselves in util.c */ diff --git a/utils/utf8.c b/utils/utf8.c index 2ebac31b6..4c3c612f5 100644 --- a/utils/utf8.c +++ b/utils/utf8.c @@ -25,8 +25,10 @@ #include <errno.h> #include <stdlib.h> #include <string.h> +#include <strings.h> #include <iconv.h> +#include "utils/config.h" #include "utils/log.h" #include "utils/utf8.h" diff --git a/utils/utils.c b/utils/utils.c index cf5b5276e..9f72be0ee 100644 --- a/utils/utils.c +++ b/utils/utils.c @@ -25,6 +25,7 @@ #include <stdlib.h> #include <stdio.h> #include <string.h> +#include <strings.h> #include <sys/stat.h> #include <sys/types.h> #include <sys/time.h> diff --git a/utils/utils.h b/utils/utils.h index 49b67528c..cf66aedca 100644 --- a/utils/utils.h +++ b/utils/utils.h @@ -75,7 +75,8 @@ void regcomp_wrapper(regex_t *preg, const char *regex, int cflags); void unicode_transliterate(unsigned int c, char **r); char *human_friendly_bytesize(unsigned long bytesize); const char *rfc1123_date(time_t t); -#if !(defined(_GNU_SOURCE) || defined(__NetBSD__)) || defined(riscos) +#if !(defined(_GNU_SOURCE) || defined(__NetBSD__)) || defined(riscos) || \ + defined(__APPLE__) char *strcasestr(const char *haystack, const char *needle); #endif unsigned int wallclock(void); |