Skip to content

Commit 6c9fa7f

Browse files
committed
Undefine O_XXX macros if compiling for posix
Fixes arduino/ArduinoCore-nRF528x-mbedos#15
1 parent beab304 commit 6c9fa7f

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/utility/SdFat.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,20 @@ class SdVolume;
4040
//==============================================================================
4141
// SdFile class
4242

43+
#ifdef O_RDONLY //ARDUINO_ARCH_MBED
44+
#undef O_READ
45+
#undef O_RDONLY
46+
#undef O_WRITE
47+
#undef O_WRONLY
48+
#undef O_RDWR
49+
#undef O_ACCMODE
50+
#undef O_APPEND
51+
#undef O_SYNC
52+
#undef O_CREAT
53+
#undef O_EXCL
54+
#undef O_TRUNC
55+
#endif
56+
4357
// flags for ls()
4458
/** ls() flag to print modify date */
4559
uint8_t const LS_DATE = 1;

0 commit comments

Comments
 (0)