From 588b4fba81403e0815ec5ef6aa1ac58e138b37f5 Mon Sep 17 00:00:00 2001 From: brectanus Date: Tue, 29 Jan 2008 22:15:48 +0000 Subject: [PATCH] Fix apr_size_t formatting. Do not bother with formatting errors on solaris. --- apache2/apache2_io.c | 2 +- apache2/modsecurity.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apache2/apache2_io.c b/apache2/apache2_io.c index ec778c3f..c82ef1c8 100644 --- a/apache2/apache2_io.c +++ b/apache2/apache2_io.c @@ -445,7 +445,7 @@ static int flatten_response_body(modsec_rec *msr) { msr->resbody_status = RESBODY_STATUS_READ_BRIGADE; if (msr->resbody_length + 1 <= 0) { - msr_log(msr, 1, "Output filter: Invalid response length: %lu", msr->resbody_length); + msr_log(msr, 1, "Output filter: Invalid response length: %" APR_SIZE_T_FMT, msr->resbody_length); return -1; } diff --git a/apache2/modsecurity.h b/apache2/modsecurity.h index 0dfcb4ae..bd4bf38f 100644 --- a/apache2/modsecurity.h +++ b/apache2/modsecurity.h @@ -31,7 +31,7 @@ typedef struct msc_string msc_string; #endif /* For GNU C, tell the compiler to check printf like formatters */ -#if defined(__GNUC__) +#if (defined(__GNUC__) && !defined(SOLARIS2)) #define PRINTF_ATTRIBUTE(a,b) __attribute__((format (printf, a, b))) #else #define PRINTF_ATTRIBUTE(a,b)