From 7964cde5bd9f3d6f3d82ee49c5b0a9c130f5ae4e Mon Sep 17 00:00:00 2001 From: Tamas TEVESZ Date: Sat, 21 Sep 2024 20:28:15 +0200 Subject: [PATCH] C library: fix build on FreeBSD FreeBSD #defines several stdio macros the same way OpenBSD does. Extend the scope of the existing special case to FreeBSD as well, and generalize the comment (in anticipation of it needing to be extended). --- src/ansi-c/library/stdio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ansi-c/library/stdio.c b/src/ansi-c/library/stdio.c index 47a2be1ba6b..85c2cbb100e 100644 --- a/src/ansi-c/library/stdio.c +++ b/src/ansi-c/library/stdio.c @@ -6,8 +6,8 @@ #define __CPROVER_STDIO_H_INCLUDED #endif -/* undefine macros in OpenBSD's stdio.h that are problematic to the checker. */ -#if defined(__OpenBSD__) +/* undefine macros in certain OS' stdio.h that are problematic to the checker. */ +#if defined(__OpenBSD__) || defined(__FreeBSD__) #undef getchar #undef putchar #undef getc