# These are thngs we can work around
AC_CHECK_MEMBERS([struct dirent.d_type],,,[#include <dirent.h>])
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])],