]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
Default to register_printf_specifier() if no printf hooking #defined
authorMartin Willi <martin@revosec.ch>
Mon, 2 Jul 2012 16:00:33 +0000 (18:00 +0200)
committerMartin Willi <martin@revosec.ch>
Tue, 3 Jul 2012 11:09:14 +0000 (13:09 +0200)
This allows us to build (non-./configured) external tools against
libstrongswan without explicitly specifiying the most commonly used
printf hooking function.

src/libstrongswan/printf_hook.h

index 11fd66ce9cba5d467045cc4a87c5802376e088a2..8e4a08302322c60470e3a0bc89d4507d925f1347 100644 (file)
@@ -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))