[vlc-commits] contribs: orc: Fix winrt build
Hugo Beauzée-Luyssen
git at videolan.org
Mon Jun 20 16:48:54 CEST 2016
vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Mon Jun 20 16:09:16 2016 +0200| [abbc5be9165e21b2ec9bbcb0a454794bffba0b26] | committer: Hugo Beauzée-Luyssen
contribs: orc: Fix winrt build
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=abbc5be9165e21b2ec9bbcb0a454794bffba0b26
---
contrib/src/orc/rules.mak | 1 +
contrib/src/orc/use-proper-func-detection.patch | 70 +++++++++++++++++++++++
2 files changed, 71 insertions(+)
diff --git a/contrib/src/orc/rules.mak b/contrib/src/orc/rules.mak
index 0d051a5..5ac4bde 100644
--- a/contrib/src/orc/rules.mak
+++ b/contrib/src/orc/rules.mak
@@ -14,6 +14,7 @@ $(TARBALLS)/orc-$(ORC_VERSION).tar.gz:
orc: orc-$(ORC_VERSION).tar.gz .sum-orc
$(UNPACK)
+ $(APPLY) $(SRC)/orc/use-proper-func-detection.patch
$(UPDATE_AUTOCONFIG)
$(MOVE)
diff --git a/contrib/src/orc/use-proper-func-detection.patch b/contrib/src/orc/use-proper-func-detection.patch
new file mode 100644
index 0000000..049ced3
--- /dev/null
+++ b/contrib/src/orc/use-proper-func-detection.patch
@@ -0,0 +1,70 @@
+--- orc/configure.ac.orig 2016-06-20 13:07:27.584543779 +0000
++++ orc/configure.ac 2016-06-20 13:14:21.920651349 +0000
+@@ -90,20 +90,7 @@
+ AS_COMPILER_FLAG(-Werror, ERROR_CFLAGS="-Werror")
+ fi
+
+-case "${host_os}" in
+- nobody_is_using_this_currently)
+- AC_DEFINE(HAVE_CODEMEM_MALLOC, 1, [Use malloc to allocate code for execution])
+- ;;
+- mingw*|pw32*|cygwin*)
+- AC_DEFINE(HAVE_CODEMEM_VIRTUALALLOC, 1, [Use VirtualAlloc to allocate code for execution])
+- ;;
+- linux*|darwin*|solaris*|netbsd*|freebsd*|openbsd*|kfreebsd*|dragonfly*|gnu*)
+- AC_DEFINE(HAVE_CODEMEM_MMAP, 1, [Use mmap to allocate code for execution])
+- ;;
+- *)
+- AC_ERROR([no code allocation backend])
+- ;;
+-esac
++AC_CHECK_FUNCS([VirtualAlloc mmap])
+
+ case "${host_os}" in
+ mingw*|pw32*|cygwin*)
+--- orc/orc/orccodemem.c.orig 2016-06-20 16:43:22.126619599 +0200
++++ orc/orc/orccodemem.c 2016-06-20 16:45:03.370771546 +0200
+@@ -11,10 +11,10 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <fcntl.h>
+-#ifdef HAVE_CODEMEM_MMAP
++#ifdef HAVE_MMAP
+ #include <sys/mman.h>
+ #endif
+-#ifdef HAVE_CODEMEM_VIRTUALALLOC
++#ifdef HAVE_VIRTUALALLOC
+ #include <windows.h>
+ #endif
+
+@@ -190,7 +190,7 @@
+ }
+ }
+
+-#ifdef HAVE_CODEMEM_MMAP
++#ifdef HAVE_MMAP
+ int
+ orc_code_region_allocate_codemem_dual_map (OrcCodeRegion *region,
+ const char *dir, int force_unlink)
+@@ -285,9 +285,7 @@
+ "and $TMPDIR and $HOME are mounted noexec (bad).");
+ }
+
+-#endif
+-
+-#ifdef HAVE_CODEMEM_VIRTUALALLOC
++#elif defined(HAVE_VIRTUALALLOC)
+ void
+ orc_code_region_allocate_codemem (OrcCodeRegion *region)
+ {
+@@ -295,9 +293,7 @@
+ region->exec_ptr = region->write_ptr;
+ region->size = SIZE;
+ }
+-#endif
+-
+-#ifdef HAVE_CODEMEM_MALLOC
++#else
+ void
+ orc_code_region_allocate_codemem (OrcCodeRegion *region)
+ {
More information about the vlc-commits
mailing list