diff options
author | Martin Willi <martin@revosec.ch> | 2012-08-10 16:50:59 +0200 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2012-08-10 17:02:05 +0200 |
commit | 922fb29f892f24ecbf792cab299343fcdef7e75f (patch) | |
tree | 572a293419020e9cd5b46c56a36b7d35556c0a20 | |
parent | cd55a3cb778d7333d7717e25becf12572e748a18 (diff) | |
download | strongswan-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.
-rw-r--r-- | src/libstrongswan/printf_hook.h | 31 |
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 |