# HG changeset patch # User komh # Date 1267088997 0 # Node ID 7e2f58933cc157174557fb07c7baaed0b8e1dcd1 # Parent dc7ed18ea0df89cabeaaf038c2bf7e2b2b90b4fc Define O_BINARY if it is undefined. This removes a platform check for open(). diff -r dc7ed18ea0df -r 7e2f58933cc1 stream/stream_cddb.c --- a/stream/stream_cddb.c Thu Feb 25 08:39:55 2010 +0000 +++ b/stream/stream_cddb.c Thu Feb 25 09:09:57 2010 +0000 @@ -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/" @@ -349,11 +353,7 @@ 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_msg(MSGT_DEMUX, MSGL_ERR, MSGTR_MPDEMUX_CDDB_NoCacheFound); return -1;