From: Andrew Tridgell Date: Thu, 27 Jan 2005 09:40:11 +0000 (+0100) Subject: - fixed a oom check X-Git-Tag: v3.0pre0~208 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0a7cea64;p=thirdparty%2Fccache.git - fixed a oom check - attempt to get sol10/x86 to build --- diff --git a/configure.in b/configure.in index 3229ef0b7..321c592fc 100644 --- a/configure.in +++ b/configure.in @@ -15,6 +15,14 @@ AC_PROG_INSTALL AC_DEFINE([_GNU_SOURCE], 1, [Define _GNU_SOURCE so that we get all necessary prototypes]) +# The definition of _GNU_SOURCE potentially causes a change of the value +# of _XOPEN_SOURCE. So define it only conditionally. +AH_VERBATIM([_XOPEN_SOURCE], +[/* Define on UNIX to activate XPG/5 features. */ +#if !defined(_XOPEN_SOURCE) +# define _XOPEN_SOURCE 500 +#endif]) + # If GCC, turn on warnings. if test "x$GCC" = "xyes" then diff --git a/util.c b/util.c index ec5ccdd49..40efa8329 100644 --- a/util.c +++ b/util.c @@ -151,7 +151,7 @@ void x_asprintf(char **ptr, const char *format, ...) vasprintf(ptr, format, ap); va_end(ap); - if (!ptr) fatal("out of memory in x_asprintf"); + if (!*ptr) fatal("out of memory in x_asprintf"); } /*