From: Andrew Hanson Date: Fri, 26 Sep 2025 10:22:17 +0000 (+0200) Subject: include/binary-io.h: guard O_BINARY usage with defined check X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=65a5bb3c1fc4632ed71dfb8c211ff756619afd29;p=thirdparty%2Fbinutils-gdb.git include/binary-io.h: guard O_BINARY usage with defined check include/ * binary-io.h: Fix -Wundef compiler warning when O_BINARY is not defined. Wrap the check to ensure portability across platforms. Signed-off-by: Andrew Hanson --- diff --git a/include/binary-io.h b/include/binary-io.h index 2f4be43a7c1..beeb0f76c25 100644 --- a/include/binary-io.h +++ b/include/binary-io.h @@ -35,7 +35,7 @@ # undef O_BINARY # undef O_TEXT #endif -#if O_BINARY +#if defined(O_BINARY) && O_BINARY # if defined __EMX__ || defined __DJGPP__ || defined __CYGWIN__ # include /* declares setmode() */ # else