summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2008-08-11 16:44:12 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2008-08-11 16:44:12 +0000
commit25018c455b1297b72bb793a8eba7bc9426e28326 (patch)
tree438e57f78edd43f3b0e20142f5e25a94368544c4 /utils
parent1124712760b2dbcd73c67a8e7249b85d860668fc (diff)
downloadnetsurf-25018c455b1297b72bb793a8eba7bc9426e28326.tar.gz
netsurf-25018c455b1297b72bb793a8eba7bc9426e28326.tar.bz2
Make nsgtk compile on Mac OS X.
svn path=/trunk/netsurf/; revision=5031
Diffstat (limited to 'utils')
-rw-r--r--utils/config.h3
-rw-r--r--utils/utf8.c2
-rw-r--r--utils/utils.c1
-rw-r--r--utils/utils.h3
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);