Skip to content

Commit acd92ac

Browse files
committed
Merge pull request #1600 from adamgreen/fixIssue1599
Fix issue #1599
2 parents dcda8ec + 5b5d7ee commit acd92ac

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

libraries/mbed/common/retarget.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,10 @@ static inline int openmode_to_posix(int openmode) {
121121
if (openmode & _LLIO_CREAT ) posix |= O_CREAT;
122122
if (openmode & _LLIO_APPEND) posix |= O_APPEND;
123123
if (openmode & _LLIO_TRUNC ) posix |= O_TRUNC;
124+
#elif defined(TOOLCHAIN_GCC)
125+
posix &= ~O_BINARY;
124126
#endif
125-
return posix & ~O_BINARY;
127+
return posix;
126128
}
127129

128130
extern "C" FILEHANDLE PREFIX(_open)(const char* name, int openmode) {

0 commit comments

Comments
 (0)