aboutsummaryrefslogtreecommitdiffstats
path: root/testing/emscripten-fastcomp/fix-build-with-musl-libc.patch
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-03-30 00:41:20 +0200
committerJakub Jirutka <jakub@jirutka.cz>2017-03-30 01:43:06 +0200
commitf934e3b95b89264efc3528b0efee02a650cdc8d6 (patch)
tree09798438ce198299cfa56fc742cc5115842a4c2d /testing/emscripten-fastcomp/fix-build-with-musl-libc.patch
parent0082ef0ebadf811f5ca8ce1837fa4442bc1b2793 (diff)
downloadaports-f934e3b95b89264efc3528b0efee02a650cdc8d6.tar.bz2
aports-f934e3b95b89264efc3528b0efee02a650cdc8d6.tar.xz
testing/emscripten-fastcomp: new aport
https://kripken.github.io/emscripten-site/ The Clang + LLVM backend for Emscripten
Diffstat (limited to 'testing/emscripten-fastcomp/fix-build-with-musl-libc.patch')
-rw-r--r--testing/emscripten-fastcomp/fix-build-with-musl-libc.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/testing/emscripten-fastcomp/fix-build-with-musl-libc.patch b/testing/emscripten-fastcomp/fix-build-with-musl-libc.patch
new file mode 100644
index 0000000000..223b7306db
--- /dev/null
+++ b/testing/emscripten-fastcomp/fix-build-with-musl-libc.patch
@@ -0,0 +1,26 @@
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Thu, 18 Feb 2016 10:33:04 +0100
+Subject: [PATCH] Fix build with musl libc
+
+On musl libc the fopen64 and fopen are the same thing, but for
+compatibility they have a `#define fopen64 fopen`. Same applies for
+fseek64, fstat64, fstatvfs64, ftello64, lstat64, stat64 and tmpfile64.
+
+--- a/include/llvm/Analysis/TargetLibraryInfo.h
++++ b/include/llvm/Analysis/TargetLibraryInfo.h
+@@ -18,6 +18,15 @@
+ #include "llvm/IR/Module.h"
+ #include "llvm/Pass.h"
+
++#undef fopen64
++#undef fseeko64
++#undef fstat64
++#undef fstatvfs64
++#undef ftello64
++#undef lstat64
++#undef stat64
++#undef tmpfile64
++
+ namespace llvm {
+ /// VecDesc - Describes a possible vectorization of a function.
+ /// Function 'VectorFnName' is equivalent to 'ScalarFnName' vectorized