From 9a7acbdbcf2feb20bd471a8a2cfafb968aa745dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Mon, 25 Jan 2021 18:49:30 +0100 Subject: [PATCH] posix: protect EOF being parsed as operator and 1 see https://github.com/haikuports/haikuports/blob/7d095c7453842db989de538921ff9e145114bc9b/dev-libs/jsoncpp/patches/jsoncpp-1.9.4.patchset Change-Id: Iaedb67eb51e86cbc5b73a21a86b6b0b6b70209b0 Reviewed-on: https://review.haiku-os.org/c/haiku/+/3679 Reviewed-by: waddlesplash --- headers/posix/libio.h | 2 +- headers/posix/stdio.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/headers/posix/libio.h b/headers/posix/libio.h index b8711c4afe..15d2cf18e8 100644 --- a/headers/posix/libio.h +++ b/headers/posix/libio.h @@ -31,7 +31,7 @@ #include #ifndef EOF -# define EOF -1 +# define EOF (-1) #endif #define _IO_pos_t off_t /* obsolete */ diff --git a/headers/posix/stdio.h b/headers/posix/stdio.h index b40328ea08..d3e01c4821 100644 --- a/headers/posix/stdio.h +++ b/headers/posix/stdio.h @@ -39,7 +39,7 @@ #ifdef EOF # undef EOF #endif -#define EOF -1 +#define EOF (-1) #ifndef SEEK_SET # define SEEK_SET 0