1

[alpine-aports] [PATCH] main/libffi: check for __linux__ not linux on mips*

Mobile Stream
Details
Message ID
<956729626.20180810164727@mobile-stream.com>
Sender timestamp
1533908847
DKIM signature
missing
Download raw message
Patch: +14 -1
The latter is not available in -std=c99 (e.g. as used by python3 build) and ffitarget.h tries to include sgidefs.h from a wrong location.

---
 main/libffi/APKBUILD                               |  4 +++-
 main/libffi/use-stdc-compatible-linux-define.patch | 11 +++++++++++
 2 files changed, 14 insertions(+), 1 deletion(-)
 create mode 100644 main/libffi/use-stdc-compatible-linux-define.patch

diff --git a/main/libffi/APKBUILD b/main/libffi/APKBUILD
index b9130c8411..3ef63f4e90 100644
--- a/main/libffi/APKBUILD
+++ b/main/libffi/APKBUILD
@@ -15,6 +15,7 @@ subpackages="$pkgname-dev $pkgname-doc"
 source="ftp://sourceware.org/pub/$pkgname/$pkgname-$pkgver.tar.gz
        gnu-linux-define.patch
        pax-dlmmap.patch
+       use-stdc-compatible-linux-define.patch
        "
 
 builddir="$srcdir"/$pkgname-$pkgver
@@ -47,4 +48,5 @@ package() {
 
 sha512sums="980ca30a8d76f963fca722432b1fe5af77d7a4e4d2eac5144fbc5374d4c596609a293440573f4294207e1bdd9fda80ad1e1cafb2ffb543df5a275bc3bd546483  libffi-3.2.1.tar.gz
 264af568ae5388d50f647f891a406945c73cc358692266f65ad341787c0bf5f6bf31203b86c39fa1b338101c1a6d2f4fec60f95a90d379951ff5153f8f9e178f  gnu-linux-define.patch
-72486b389db16055ae4d7d33ba0cb05840537e28fe7a86aa89e2cb922592125d99c18c26c5df7ffde6282742e79f2b9126353e58b58f091f0486589e14dd6474  pax-dlmmap.patch"
+72486b389db16055ae4d7d33ba0cb05840537e28fe7a86aa89e2cb922592125d99c18c26c5df7ffde6282742e79f2b9126353e58b58f091f0486589e14dd6474  pax-dlmmap.patch
+d15aaf7ecf6fe7a1532695a515a496d462c3930a50ec3e2a019713ecfc810a112250563c41f018834323f201f1c814e7c94d296f167706af300907264ee80924  use-stdc-compatible-linux-define.patch"
diff --git a/main/libffi/use-stdc-compatible-linux-define.patch b/main/libffi/use-stdc-compatible-linux-define.patch
new file mode 100644
index 0000000000..ad7c875015
--- /dev/null
+++ b/main/libffi/use-stdc-compatible-linux-define.patch
@@ -0,0 +1,11 @@
+--- a/src/mips/ffitarget.h
+@@ -32,7 +32,7 @@
+ #error "Please do not include ffitarget.h directly into your source.  Use ffi.h instead."
+ #endif
+ 
+-#ifdef linux
++#ifdef __linux__
+ # include <asm/sgidefs.h>
+ #elif defined(__rtems__)
+ /*
-- 
2.18.0



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Natanael Copa
Details
Message ID
<20180903194821.7054c203@ncopa-desktop.copa.dup.pw>
In-Reply-To
<956729626.20180810164727@mobile-stream.com> (view parent)
Sender timestamp
1535996901
DKIM signature
missing
Download raw message
On Fri, 10 Aug 2018 16:47:27 +0300
Mobile Stream <info@mobile-stream.com> wrote:

> The latter is not available in -std=c99 (e.g. as used by python3 build) and ffitarget.h tries to include sgidefs.h from a wrong location.
> 
> ---
>  main/libffi/APKBUILD                               |  4 +++-
>  main/libffi/use-stdc-compatible-linux-define.patch | 11 +++++++++++
>  2 files changed, 14 insertions(+), 1 deletion(-)
>  create mode 100644 main/libffi/use-stdc-compatible-linux-define.patch
> 
> diff --git a/main/libffi/APKBUILD b/main/libffi/APKBUILD
> index b9130c8411..3ef63f4e90 100644
> --- a/main/libffi/APKBUILD
> +++ b/main/libffi/APKBUILD
> @@ -15,6 +15,7 @@ subpackages="$pkgname-dev $pkgname-doc"
>  source="ftp://sourceware.org/pub/$pkgname/$pkgname-$pkgver.tar.gz
>         gnu-linux-define.patch
>         pax-dlmmap.patch
> +       use-stdc-compatible-linux-define.patch
>         "

Seems like something is replacing the tabs with spaces so git am fails. Weird.

-nc


---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---