[libbdplus-devel] Fix mingw32 build

anonymous git at videolan.org
Fri Jan 23 12:58:28 CET 2015


libbdplus | branch: master | anonymous <anonymous at anonymous.org> | Fri Jan 23 13:58:05 2015 +0200| [369ad45c5eb307ab3d476b155cc889e99a912178] | committer: anonymous

Fix mingw32 build

> http://git.videolan.org/gitweb.cgi/libbdplus.git/?a=commit;h=369ad45c5eb307ab3d476b155cc889e99a912178
---

 src/file/file_default.c     |   12 ++++++------
 src/libbdplus/bdplus_data.h |    3 ++-
 src/util/mutex.h            |    4 ++--
 3 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/src/file/file_default.c b/src/file/file_default.c
index 5ccb911..64b732a 100644
--- a/src/file/file_default.c
+++ b/src/file/file_default.c
@@ -21,12 +21,6 @@
 #include "config.h"
 #endif
 
-#if defined(__MINGW32__)
-/* fseeko64() prototypes from stdio.h */
-#   undef __STRICT_ANSI__
-#   define fseeko fseeko64
-#endif
-
 #include "file_default.h"
 
 #include "file.h"
@@ -37,6 +31,12 @@
 #include <stdio.h>
 #include <stdlib.h>
 
+#if defined(__MINGW32__)
+/* fseeko64() prototypes from stdio.h */
+#   undef __STRICT_ANSI__
+#   define fseeko fseeko64
+#endif
+
 static void _file_close(BDPLUS_FILE_H *file)
 {
     if (file) {
diff --git a/src/libbdplus/bdplus_data.h b/src/libbdplus/bdplus_data.h
index 440fa8f..7521f4b 100644
--- a/src/libbdplus/bdplus_data.h
+++ b/src/libbdplus/bdplus_data.h
@@ -22,6 +22,7 @@
 #define BDPLUS_DATA_H_INCLUDED
 
 #include "util/attributes.h"
+#include "util/mutex.h"
 
 #include "internal.h"
 
@@ -54,7 +55,7 @@ struct bdplus_s {
 
     struct bdplus_config_s *config;
 
-    struct bd_mutex_s  *mutex;
+    BD_MUTEX *mutex;
 
     uint8_t   loaded;
     uint8_t   started;
diff --git a/src/util/mutex.h b/src/util/mutex.h
index e61d266..6c19704 100644
--- a/src/util/mutex.h
+++ b/src/util/mutex.h
@@ -85,7 +85,7 @@ struct bd_mutex_s {
 BD_PRIVATE int bd_mutex_init(BD_MUTEX *p);
 BD_PRIVATE int bd_mutex_destroy(BD_MUTEX *p);
 
-static int bd_mutex_lock(BD_MUTEX *p)
+static inline int bd_mutex_lock(BD_MUTEX *p)
 {
     if (pthread_equal(p->owner, pthread_self())) {
         /* recursive lock */
@@ -104,7 +104,7 @@ static int bd_mutex_lock(BD_MUTEX *p)
     return 0;
 }
 
-static int bd_mutex_unlock(BD_MUTEX *p)
+static inline int bd_mutex_unlock(BD_MUTEX *p)
 {
     if (!pthread_equal(p->owner, pthread_self())) {
         BD_DEBUG(DBG_BLURAY|DBG_CRIT, "bd_mutex_unlock(): not owner !\n");



More information about the libbdplus-devel mailing list