aboutsummaryrefslogtreecommitdiffstats
path: root/main/libbsd
diff options
context:
space:
mode:
authorTuan M. Hoang <tmhoang@flatglobe.org>2017-04-21 05:22:32 -0400
committerJakub Jirutka <jakub@jirutka.cz>2017-04-22 01:27:57 +0200
commit97b8d79035eca26261545c1f6fc7f5e9612ca14f (patch)
treec9585dbcfc1dca3da03f9989c59b9ebc6e94a810 /main/libbsd
parent298ea21b4cd40af3977665254445be4c4ca213a9 (diff)
downloadaports-97b8d79035eca26261545c1f6fc7f5e9612ca14f.tar.bz2
aports-97b8d79035eca26261545c1f6fc7f5e9612ca14f.tar.xz
main/libbsd: add N_SYMOFF N_BADMAG for netcat-openbsd (fix s390x)
Building main/netcat-openbsd requires N_SYMOFF N_BADMAG. These two definitions are also copied from a.out.h. The build turns out good, then main/libvirt also good. In the future usage, this a.out.h thing should be taken into accounts for bugs.
Diffstat (limited to 'main/libbsd')
-rw-r--r--main/libbsd/APKBUILD4
-rw-r--r--main/libbsd/fix-build-with-musl-on-ppc64le-s390x.patch23
2 files changed, 24 insertions, 3 deletions
diff --git a/main/libbsd/APKBUILD b/main/libbsd/APKBUILD
index 140f0adfec..5094657100 100644
--- a/main/libbsd/APKBUILD
+++ b/main/libbsd/APKBUILD
@@ -3,7 +3,7 @@
# Maintainer: William Pitcock <nenolod@dereferenced.org>
pkgname=libbsd
pkgver=0.8.3
-pkgrel=1
+pkgrel=2
pkgdesc="commonly-used BSD functions not implemented by all libcs"
url="http://libbsd.freedesktop.org/"
arch="all !armhf !aarch64"
@@ -45,4 +45,4 @@ package() {
sha512sums="155b895d6bd62b180718d65a2cda7484946c492d52735a57b51005705dfe4528b6a72e8745acea47b01fe68e3bbbe3c036c5e9998a8d06fc79efe2b96a04767f libbsd-0.8.3.tar.xz
032b8de7abfe6ffec80957db05fcb02b2cec74f26ecc99ef20d2a314efd0dfd88486e31bd33dd7460ac85b48acdab3ba849cd96bdd0884cd5667e7a43ab30c3a musl-fixes.patch
-19d7a11fae5b2927eafa320cb683b8645df2cb04f8ea05934543351b07eaa033d3cabe90687048e4a5a2e7efdddab409061fcddf0dea8cb769bad04670659d2e fix-build-with-musl-on-ppc64le-s390x.patch"
+f6c6bf62f1f840de6939e255eca165298a50f45241588b2ea18b314991fb60677316ba954bab179538b5babe0c6140e038b6fb49ecdeea569048fc3e5be7caf0 fix-build-with-musl-on-ppc64le-s390x.patch"
diff --git a/main/libbsd/fix-build-with-musl-on-ppc64le-s390x.patch b/main/libbsd/fix-build-with-musl-on-ppc64le-s390x.patch
index 0216ef5cf7..7542f15dc3 100644
--- a/main/libbsd/fix-build-with-musl-on-ppc64le-s390x.patch
+++ b/main/libbsd/fix-build-with-musl-on-ppc64le-s390x.patch
@@ -9,7 +9,7 @@ by libbsd instead of including the invalid header for ppc64le and s390x.
===
--- libbsd-0.8.3.orig/src/nlist.c
+++ libbsd-0.8.3/src/nlist.c
-@@ -40,7 +40,49 @@ static char sccsid[] = "@(#)nlist.c 8.1 (Berkeley) 6/4/93";
+@@ -40,7 +40,70 @@ static char sccsid[] = "@(#)nlist.c 8.1 (Berkeley) 6/4/93";
#include <errno.h>
#include <fcntl.h>
@@ -51,6 +51,27 @@ by libbsd instead of including the invalid header for ppc64le and s390x.
+#define N_EXT 1
+#define N_STAB 0340
+
++#define N_MAGIC(exec) ((exec).a_info & 0xffff)
++
++#define OMAGIC 0407
++#define NMAGIC 0410
++#define ZMAGIC 0413
++#define QMAGIC 0314
++#define N_TRSIZE(a) ((a).a_trsize)
++#define N_DRSIZE(a) ((a).a_drsize)
++
++#define N_BADMAG(x) \
++ (N_MAGIC(x) != OMAGIC && N_MAGIC(x) != NMAGIC \
++ && N_MAGIC(x) != ZMAGIC && N_MAGIC(x) != QMAGIC)
++#define _N_HDROFF(x) (1024 - sizeof (struct exec))
++#define N_TXTOFF(x) \
++ (N_MAGIC(x) == ZMAGIC ? _N_HDROFF((x)) + sizeof (struct exec) : \
++ (N_MAGIC(x) == QMAGIC ? 0 : sizeof (struct exec)))
++#define N_DATOFF(x) (N_TXTOFF(x) + (x).a_text)
++#define N_TRELOFF(x) (N_DATOFF(x) + (x).a_data)
++#define N_DRELOFF(x) (N_TRELOFF(x) + N_TRSIZE(x))
++#define N_SYMOFF(x) (N_DRELOFF(x) + N_DRSIZE(x))
++
+#else
#include <linux/a.out.h>
+