diff options
Diffstat (limited to 'stream/stream_cddb.c')
-rw-r--r-- | stream/stream_cddb.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/stream/stream_cddb.c b/stream/stream_cddb.c index 8bbe9d33b2..c83acfb633 100644 --- a/stream/stream_cddb.c +++ b/stream/stream_cddb.c @@ -74,6 +74,10 @@ #include "network.h" #include "libavutil/common.h" +#ifndef O_BINARY +#define O_BINARY 0 +#endif + #define DEFAULT_FREEDB_SERVER "freedb.freedb.org" #define DEFAULT_CACHE_DIR "/.cddb/" @@ -346,11 +350,7 @@ int cddb_read_cache(cddb_data_t *cddb_data) sprintf(file_name, "%s%08lx", cddb_data->cache_dir, cddb_data->disc_id); - file_fd = open(file_name, O_RDONLY -#if defined(__MINGW32__) || defined(__CYGWIN__) - | O_BINARY -#endif - ); + file_fd = open(file_name, O_RDONLY | O_BINARY); if (file_fd < 0) { mp_tmsg(MSGT_DEMUX, MSGL_ERR, "No cache found.\n"); return -1; |