From: Martin Willi Date: Mon, 2 Jul 2012 16:00:33 +0000 (+0200) Subject: Default to register_printf_specifier() if no printf hooking #defined X-Git-Tag: 5.0.1~459 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e0fe9f13eadd6ace435dd9941fa0a998e9324d2;p=thirdparty%2Fstrongswan.git Default to register_printf_specifier() if no printf hooking #defined This allows us to build (non-./configured) external tools against libstrongswan without explicitly specifiying the most commonly used printf hooking function. --- diff --git a/src/libstrongswan/printf_hook.h b/src/libstrongswan/printf_hook.h index 11fd66ce9c..8e4a083023 100644 --- a/src/libstrongswan/printf_hook.h +++ b/src/libstrongswan/printf_hook.h @@ -26,6 +26,13 @@ typedef struct printf_hook_t printf_hook_t; typedef struct printf_hook_spec_t printf_hook_spec_t; typedef enum printf_hook_argtype_t printf_hook_argtype_t; +#if !defined(USE_VSTR) && \ + !defined(HAVE_PRINTF_FUNCTION) && \ + !defined(HAVE_PRINTF_SPECIFIER) +/* assume newer glibc register_printf_specifier if none given */ +#define HAVE_PRINTF_SPECIFIER +#endif + #if !defined(USE_VSTR) && \ (defined(HAVE_PRINTF_FUNCTION) || defined(HAVE_PRINTF_SPECIFIER))