reveng: build with clang and _FORTIFY_SOURCE

Makefile.defs hardening sets -D_FORTIFY_SOURCE=3. Under clang, glibc's
stdio2.h then defines fprintf as a macro, so the stdout hook in
deps/reveng/config.h redefined it and -Werror stopped the build in
bmpbit.c, cli.c, model.c, poly.c, preset.c and src/cmdcrc.c. Undefine
fprintf, fputs and puts before hooking them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
iceman1001andClaude Opus 5.5 committed 2026-11-09 14:01:51 +07:00
1 parent 9b9503f4ff
commit 340819e430
1 file changed
+4
+4
View File
@@ -103,6 +103,10 @@
// Proxmark3 stdout/stderr hooking
#include "ui.h"
// glibc defines these as macros under clang with _FORTIFY_SOURCE
#undef fprintf
#undef fputs
#undef puts
#define fprintf(stream, ...) PrintAndLogEx(INFO, __VA_ARGS__)
#define fputs(s, stream) PrintAndLogEx(INFO, "%s", s)
#define puts(s) PrintAndLogEx(SUCCESS, "%s", s)