From f40e5f7129ece4b74aa2cb23b28b24b381bbe223 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Mon, 18 Mar 2013 20:03:57 +0100 Subject: Add workaround for broken strndup() in firefox Unconditionally use our own strndup() until this issue is resolved and in the stable versions of various distros. See: https://bugzilla.mozilla.org/show_bug.cgi?id=826171 --- configure.ac | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index b0d4703..02e7793 100644 --- a/configure.ac +++ b/configure.ac @@ -78,10 +78,15 @@ if test "$os_unix" = "yes"; then # These are thngs we can work around AC_CHECK_MEMBERS([struct dirent.d_type],,,[#include ]) AC_CHECK_FUNCS([getprogname getexecname basename mkstemp mkdtemp]) - AC_CHECK_FUNCS([strnstr memdup strndup]) + AC_CHECK_FUNCS([strnstr memdup]) AC_CHECK_FUNCS([asprintf vasprintf vsnprintf]) AC_CHECK_FUNCS([timegm]) + # WORKAROUND: So in lots of released builds of firefox a completely broken strndup() + # is present. It does not NULL terminate its string output. It is unconditionally + # defined, and overrides the libc strndup() function on platforms where it + # exists. For this reason we (for now) unconditionally define strndup(). + # Required functions AC_CHECK_FUNCS([gmtime_r], [AC_DEFINE([HAVE_GMTIME_R], 1, [Whether gmtime_r() is available])], -- cgit v1.1