Skip to content

Commit 165d253

Browse files
committed
Merge pull request #1595 from adamgreen/gccFOpenBinaryFlagIgnore
LocalFileSystem fails to open binary files
2 parents 70c8bcf + c6d2c81 commit 165d253

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/mbed/common/retarget.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ static inline int openmode_to_posix(int openmode) {
122122
if (openmode & _LLIO_APPEND) posix |= O_APPEND;
123123
if (openmode & _LLIO_TRUNC ) posix |= O_TRUNC;
124124
#endif
125-
return posix;
125+
return posix & ~O_BINARY;
126126
}
127127

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

0 commit comments

Comments
 (0)