app-admin/chrpath: add fix for Solaris

Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Package-Manager: Portage-2.3.66, Repoman-2.3.11
This commit is contained in:
Fabian Groffen
2019-06-17 20:35:27 +02:00
parent 624185ebb5
commit b18f34b68c
2 changed files with 20 additions and 0 deletions

View File

@@ -17,6 +17,7 @@ IUSE="static-libs"
PATCHES=(
"${FILESDIR}"/${P}-multilib.patch
"${FILESDIR}"/${P}-testsuite-1.patch
"${FILESDIR}"/${P}-solaris.patch
)
src_prepare() {

View File

@@ -0,0 +1,19 @@
protos: add bswap macros for Solaris
--- a/protos.h
+++ b/protos.h
@@ -1,7 +1,14 @@
#ifndef PROTOS_H
#define PROTOS_H
+#if defined(__sun)
+#include <sys/byteorder.h>
+#define bswap_16(x) BSWAP_16(x)
+#define bswap_32(x) BSWAP_32(x)
+#define bswap_64(x) BSWAP_64(x)
+#else
#include <byteswap.h>
+#endif
#include <elf.h>
#include "config.h"