Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / compilers / llvm / TLI-musl.patch
blob1a690808663727381773c34c2cdf152e1c518d51
1 From 5c571082fdaf61f6df19d9b7137dc26d71334058 Mon Sep 17 00:00:00 2001
2 From: Natanael Copa <ncopa@alpinelinux.org>
3 Date: Thu, 18 Feb 2016 10:33:04 +0100
4 Subject: [PATCH 2/3] Fix build with musl libc
6 On musl libc the fopen64 and fopen are the same thing, but for
7 compatibility they have a `#define fopen64 fopen`. Same applies for
8 fseek64, fstat64, fstatvfs64, ftello64, lstat64, stat64 and tmpfile64.
9 ---
10 include/llvm/Analysis/TargetLibraryInfo.h | 9 +++++++++
11 1 file changed, 9 insertions(+)
13 diff --git a/include/llvm/Analysis/TargetLibraryInfo.h b/include/llvm/Analysis/TargetLibraryInfo.h
14 index 7becdf0..7f14427 100644
15 --- a/include/llvm/Analysis/TargetLibraryInfo.h
16 +++ b/include/llvm/Analysis/TargetLibraryInfo.h
17 @@ -18,6 +18,15 @@
18 #include "llvm/IR/Module.h"
19 #include "llvm/Pass.h"
21 +#undef fopen64
22 +#undef fseeko64
23 +#undef fstat64
24 +#undef fstatvfs64
25 +#undef ftello64
26 +#undef lstat64
27 +#undef stat64
28 +#undef tmpfile64
30 namespace llvm {
31 /// VecDesc - Describes a possible vectorization of a function.
32 /// Function 'VectorFnName' is equivalent to 'ScalarFnName' vectorized
33 --
34 2.7.3