1 |
commit: 6037fa1f1074bcf0fa9ef762d58fc79ca4a2b915 |
2 |
Author: Tupone Alfredo <tupone <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Apr 19 19:40:08 2019 +0000 |
4 |
Commit: Alfredo Tupone <tupone <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Apr 19 19:40:08 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6037fa1f |
7 |
|
8 |
dev-lang/gnat-gpl: Fix missing ustat.h for gnat-gpl-2016 |
9 |
|
10 |
Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org> |
11 |
Package-Manager: Portage-2.3.62, Repoman-2.3.11 |
12 |
|
13 |
dev-lang/gnat-gpl/files/gnat-gpl-2016-ustat.patch | 31 +++++++++++++++++++++++ |
14 |
dev-lang/gnat-gpl/gnat-gpl-2016-r3.ebuild | 4 ++- |
15 |
2 files changed, 34 insertions(+), 1 deletion(-) |
16 |
|
17 |
diff --git a/dev-lang/gnat-gpl/files/gnat-gpl-2016-ustat.patch b/dev-lang/gnat-gpl/files/gnat-gpl-2016-ustat.patch |
18 |
new file mode 100644 |
19 |
index 00000000000..ee0d22dcc9f |
20 |
--- /dev/null |
21 |
+++ b/dev-lang/gnat-gpl/files/gnat-gpl-2016-ustat.patch |
22 |
@@ -0,0 +1,31 @@ |
23 |
+--- a/gcc-4.9-gpl-2016-src/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc 2019-04-19 20:53:11.382114157 +0200 |
24 |
++++ b/gcc-4.9-gpl-2016-src/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc 2019-04-19 20:57:10.725037767 +0200 |
25 |
+@@ -81,7 +81,6 @@ |
26 |
+ #include <sys/statvfs.h> |
27 |
+ #include <sys/timex.h> |
28 |
+ #include <sys/user.h> |
29 |
+-#include <sys/ustat.h> |
30 |
+ #include <linux/cyclades.h> |
31 |
+ #include <linux/if_eql.h> |
32 |
+ #include <linux/if_plip.h> |
33 |
+@@ -163,7 +162,19 @@ |
34 |
+ unsigned struct_old_utsname_sz = sizeof(struct old_utsname); |
35 |
+ unsigned struct_oldold_utsname_sz = sizeof(struct oldold_utsname); |
36 |
+ unsigned struct_itimerspec_sz = sizeof(struct itimerspec); |
37 |
+- unsigned struct_ustat_sz = sizeof(struct ustat); |
38 |
++ // Use pre-computed size of struct ustat to avoid <sys/ustat.h> which |
39 |
++ // has been removed from glibc 2.28. |
40 |
++#if defined(__aarch64__) || defined(__s390x__) || defined (__mips64) \ |
41 |
++ || defined(__powerpc64__) || defined(__arch64__) || defined(__sparcv9) \ |
42 |
++ || defined(__x86_64__) |
43 |
++#define SIZEOF_STRUCT_USTAT 32 |
44 |
++#elif defined(__arm__) || defined(__i386__) || defined(__mips__) \ |
45 |
++ || defined(__powerpc__) || defined(__s390__) || defined(__sparc__) |
46 |
++#define SIZEOF_STRUCT_USTAT 20 |
47 |
++#else |
48 |
++#error Unknown size of struct ustat |
49 |
++#endif |
50 |
++ unsigned struct_ustat_sz = SIZEOF_STRUCT_USTAT; |
51 |
+ #endif // SANITIZER_LINUX |
52 |
+ |
53 |
+ #if SANITIZER_LINUX && !SANITIZER_ANDROID |
54 |
|
55 |
diff --git a/dev-lang/gnat-gpl/gnat-gpl-2016-r3.ebuild b/dev-lang/gnat-gpl/gnat-gpl-2016-r3.ebuild |
56 |
index b9eabc78636..86322c8996a 100644 |
57 |
--- a/dev-lang/gnat-gpl/gnat-gpl-2016-r3.ebuild |
58 |
+++ b/dev-lang/gnat-gpl/gnat-gpl-2016-r3.ebuild |
59 |
@@ -1,4 +1,4 @@ |
60 |
-# Copyright 1999-2018 Gentoo Authors |
61 |
+# Copyright 1999-2019 Gentoo Authors |
62 |
# Distributed under the terms of the GNU General Public License v2 |
63 |
|
64 |
EAPI="5" |
65 |
@@ -146,6 +146,8 @@ src_prepare() { |
66 |
epatch "${FILESDIR}/${P}-finalization.patch" |
67 |
# add profile for gnat_util compatibility |
68 |
epatch "${FILESDIR}/${P}-profile.patch" |
69 |
+ # fix missing ustat.h |
70 |
+ epatch "${FILESDIR}/${P}-ustat.patch" |
71 |
|
72 |
toolchain_src_prepare |