Avoid re-define of O_BINARY on Windows
(Fixes
#include "stlink/mmap.h"
#include "stlink/logging.h"
-#ifndef _WIN32
-#define O_BINARY 0 //! @todo get rid of this OH MY (@xor-gate)
+#ifdef _WIN32
+#ifndef O_BINARY
+#define O_BINARY 0
#endif
+#endif
+
#ifdef _MSC_VER
#define __attribute__(x)
#endif
