aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2012-08-10 16:50:59 +0200
committerMartin Willi <martin@revosec.ch>2012-08-10 17:02:05 +0200
commit922fb29f892f24ecbf792cab299343fcdef7e75f (patch)
tree572a293419020e9cd5b46c56a36b7d35556c0a20 /src/libstrongswan
parentcd55a3cb778d7333d7717e25becf12572e748a18 (diff)
downloadstrongswan-922fb29f892f24ecbf792cab299343fcdef7e75f.tar.bz2
strongswan-922fb29f892f24ecbf792cab299343fcdef7e75f.tar.xz
If vstr printf functions are #defined, undef them before redefinition
At least Mountain Lion seems to have them #defined to secure _chk variants.
Diffstat (limited to 'src/libstrongswan')
-rw-r--r--src/libstrongswan/printf_hook.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/libstrongswan/printf_hook.h b/src/libstrongswan/printf_hook.h
index 93026cc34..6beb4fef1 100644
--- a/src/libstrongswan/printf_hook.h
+++ b/src/libstrongswan/printf_hook.h
@@ -97,6 +97,37 @@ int vstr_wrapper_vsprintf(char *str, const char *format, va_list ap);
int vstr_wrapper_vsnprintf(char *str, size_t size, const char *format, va_list ap);
int vstr_wrapper_vasprintf(char **str, const char *format, va_list ap);
+#ifdef printf
+#undef printf
+#endif
+#ifdef fprintf
+#undef fprintf
+#endif
+#ifdef sprintf
+#undef sprintf
+#endif
+#ifdef snprintf
+#undef snprintf
+#endif
+#ifdef asprintf
+#undef asprintf
+#endif
+#ifdef vprintf
+#undef vprintf
+#endif
+#ifdef vfprintf
+#undef vfprintf
+#endif
+#ifdef vsprintf
+#undef vsprintf
+#endif
+#ifdef vsnprintf
+#undef vsnprintf
+#endif
+#ifdef vasprintf
+#undef vasprintf
+#endif
+
#define printf vstr_wrapper_printf
#define fprintf vstr_wrapper_fprintf
#define sprintf vstr_wrapper_sprintf