summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConrad Kostecki <conikost@gentoo.org>2022-02-11 15:49:08 +0100
committerConrad Kostecki <conikost@gentoo.org>2022-02-11 15:53:08 +0100
commit28147e538fd61399ba364a65bc51a12289e622ff (patch)
tree69d67a939513a3f246a5f569f7872dd5049763b0 /dev-libs/serdisplib
parentprofiles/base: stable-mask sys-apps/nvme-cli[hugepages] (diff)
downloadgentoo-28147e538fd61399ba364a65bc51a12289e622ff.tar.gz
gentoo-28147e538fd61399ba364a65bc51a12289e622ff.tar.bz2
gentoo-28147e538fd61399ba364a65bc51a12289e622ff.zip
dev-libs/serdisplib: fix compilation with musl
Closes: https://bugs.gentoo.org/830520 Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
Diffstat (limited to 'dev-libs/serdisplib')
-rw-r--r--dev-libs/serdisplib/files/serdisplib-2.02-musl.patch19
-rw-r--r--dev-libs/serdisplib/serdisplib-2.02-r2.ebuild1
2 files changed, 20 insertions, 0 deletions
diff --git a/dev-libs/serdisplib/files/serdisplib-2.02-musl.patch b/dev-libs/serdisplib/files/serdisplib-2.02-musl.patch
new file mode 100644
index 000000000000..4307c6d9c9c1
--- /dev/null
+++ b/dev-libs/serdisplib/files/serdisplib-2.02-musl.patch
@@ -0,0 +1,19 @@
+Include <sys/type.h> before defining "ushort" macro
+
+sys/types.h uses a typedef to define ushort. If ushort is defined as a macro,
+this will cause a compile failure.
+
+In file included from serdisp_control.c:43:
+../include/serdisplib/serdisp_gpevents.h:75:19: error: expected identifier or '(' before 'unsigned'
+ 75 | #define ushort (unsigned short)
+
+--- a/include/serdisplib/serdisp_gpevents.h
++++ b/include/serdisplib/serdisp_gpevents.h
+@@ -50,6 +50,7 @@
+ #include "serdisplib/serdisp_connect.h"
+ #include "serdisplib/serdisp_control.h"
+ #include <sys/time.h>
++#include <sys/types.h>
+ #include <stdint.h>
+
+ #include "../../config.h"
diff --git a/dev-libs/serdisplib/serdisplib-2.02-r2.ebuild b/dev-libs/serdisplib/serdisplib-2.02-r2.ebuild
index f2424cb07e9d..22cb104e7e06 100644
--- a/dev-libs/serdisplib/serdisplib-2.02-r2.ebuild
+++ b/dev-libs/serdisplib/serdisplib-2.02-r2.ebuild
@@ -47,6 +47,7 @@ DOCS=( "AUTHORS" "BUGS" "DOCS" "HISTORY" "PINOUTS" "README" "TODO" )
PATCHES=(
"${FILESDIR}/${PN}-2.02-use-destdir.patch"
"${FILESDIR}/${PN}-2.02-disable-static-build.patch"
+ "${FILESDIR}/${PN}-2.02-musl.patch"
)
src_prepare() {