diff stream/stream_cddb.c @ 30685:7e2f58933cc1

Define O_BINARY if it is undefined. This removes a platform check for open().
author komh
date Thu, 25 Feb 2010 09:09:57 +0000
parents 16d7ef2f04e5
children ce392deeb0a6
line wrap: on
line diff
--- 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;