mirror of
https://github.com/stefanberger/libtpms
synced 2026-08-12 18:28:32 +00:00
tpm: #undef printf in case it is #define'd (OSS-Fuzz)
The build environment used by OSS-Fuzz reports this error.
In file included from /src/libtpms/src/tpm_debug.c:42:
/src/libtpms/src/tpm_debug.h:69:9: error: 'printf' macro redefined [-Werror,-Wmacro-redefined]
#define printf(...) TPMLIB_LogPrintf(__VA_ARGS__);
: ^
/usr/include/x86_64-linux-gnu/bits/stdio2.h:110:11: note: previous definition is here
# define printf(...) \
^
1 error generated.
The simple fix is to #undef printf in case it is #define'd.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
This commit is contained in:
parent
13dcff6592
commit
f9a6f51cb8
@ -66,6 +66,9 @@ extern int swallow_rc;
|
||||
#endif /* TPM_DEBUG */
|
||||
#endif
|
||||
|
||||
#ifdef printf
|
||||
# undef printf
|
||||
#endif
|
||||
#define printf(...) TPMLIB_LogPrintf(__VA_ARGS__);
|
||||
|
||||
#endif
|
||||
|
||||
Loading…
Reference in New Issue
Block a user