From: Wayne Davison Date: Mon, 1 Aug 2011 06:31:17 +0000 (-0700) Subject: Tweak includes to fix non-defined NULL on some systems. X-Git-Tag: v3.1.0pre1~95 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=64fa23add924af850546fca2575f7a1e76565af9;p=thirdparty%2Frsync.git Tweak includes to fix non-defined NULL on some systems. --- diff --git a/lib/snprintf.c b/lib/snprintf.c index dd72f3e8..c17868f0 100644 --- a/lib/snprintf.c +++ b/lib/snprintf.c @@ -37,7 +37,7 @@ * which showed it, so that's been fixed. Also, formated the code * to mutt conventions, and removed dead code left over from the * original. Also, there is now a builtin-test, just compile with: - * gcc -DTEST_SNPRINTF -o snprintf snprintf.c -lm + * gcc -I.. -DTEST_SNPRINTF -o snprintf snprintf.c -lm * and run snprintf for results. * * Thomas Roessler 01/27/98 for mutt 0.89i @@ -103,7 +103,7 @@ * **************************************************************/ -#include "../config.h" +#include "config.h" #ifdef TEST_SNPRINTF /* need math library headers for testing */ @@ -141,6 +141,10 @@ void dummy_snprintf(void) {} #endif /* HAVE_SNPRINTF, etc */ +#ifdef STDC_HEADERS +#include +#endif + #ifdef HAVE_LONG_DOUBLE #define LDOUBLE long double #else