Skip to content

Commit

Permalink
C library: fix build on FreeBSD
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
melak committed Sep 21, 2024
1 parent d2b4455 commit 7964cde
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ansi-c/library/stdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7964cde

Please sign in to comment.