Add -D_NETBSD_SOURCE to Makefile.unix for building on NetBSD. Also don't provide prototype for strcasestr under NetBSD. Fixes segfaults.

svn path=/trunk/netsurf/; revision=3943
This commit is contained in:
Rob Kendrick 2008-03-12 21:16:15 +00:00
parent c85be437b3
commit 6906f6b861
2 changed files with 2 additions and 1 deletions

View File

@ -89,6 +89,7 @@ GTKCFLAGS := -std=c99 -Dgtk -Dnsgtk \
-D_BSD_SOURCE \ -D_BSD_SOURCE \
-D_XOPEN_SOURCE=600 \ -D_XOPEN_SOURCE=600 \
-D_POSIX_C_SOURCE=200112L \ -D_POSIX_C_SOURCE=200112L \
-D_NETBSD_SOURCE \
$(WARNFLAGS) -I. -g -O \ $(WARNFLAGS) -I. -g -O \
$(shell pkg-config --cflags libglade-2.0 gtk+-2.0 librsvg-2.0) \ $(shell pkg-config --cflags libglade-2.0 gtk+-2.0 librsvg-2.0) \
$(shell xml2-config --cflags) $(shell xml2-config --cflags)

View File

@ -66,7 +66,7 @@ void regcomp_wrapper(regex_t *preg, const char *regex, int cflags);
void unicode_transliterate(unsigned int c, char **r); void unicode_transliterate(unsigned int c, char **r);
char *human_friendly_bytesize(unsigned long bytesize); char *human_friendly_bytesize(unsigned long bytesize);
const char *rfc1123_date(time_t t); const char *rfc1123_date(time_t t);
#ifndef _GNU_SOURCE #if !(defined(_GNU_SOURCE) || defined(__NetBSD__))
char *strcasestr(const char *haystack, const char *needle); char *strcasestr(const char *haystack, const char *needle);
#endif #endif
unsigned int wallclock(void); unsigned int wallclock(void);