commit:     aa59b7b0761874e3478702334b14a7df8c08b912
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 29 06:17:40 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Dec 29 06:27:10 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aa59b7b0

sys-apps/pcmciautils: fix musl build

Closes: https://bugs.gentoo.org/716120
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../pcmciautils-018_p8-musl-unsigned-type.patch    | 24 ++++++++++++++++++++++
 sys-apps/pcmciautils/pcmciautils-018_p8-r3.ebuild  | 13 ++++++------
 2 files changed, 31 insertions(+), 6 deletions(-)

diff --git 
a/sys-apps/pcmciautils/files/pcmciautils-018_p8-musl-unsigned-type.patch 
b/sys-apps/pcmciautils/files/pcmciautils-018_p8-musl-unsigned-type.patch
new file mode 100644
index 000000000000..6039b8147096
--- /dev/null
+++ b/sys-apps/pcmciautils/files/pcmciautils-018_p8-musl-unsigned-type.patch
@@ -0,0 +1,24 @@
+https://git.alpinelinux.org/aports/plain/main/pcmciautils/unsigned.patch
+https://bugs.gentoo.org/716120
+--- a/src/read-cis.c
++++ b/src/read-cis.c
+@@ -51,7 +51,7 @@
+               /* Get indirect link from the MFC tuple */
+               read_cis(tuple->Flags.link_space,
+                              tuple->LinkOffset, 5, link);
+-              ofs = *(u_int *)(link+1);
++              ofs = *(unsigned int *)(link+1);
+               tuple->Flags.space = (link[0] == CISTPL_MFC_ATTR);
+               /* Move to the next indirect link */
+               tuple->LinkOffset += 5;
+--- a/src/yacc_config.y
++++ b/src/yacc_config.y
+@@ -40,7 +40,7 @@
+ 
+ %union {
+     char *str;
+-    u_long num;
++    unsigned long num;
+     struct adjust_list_t *adjust;
+ }
+ 

diff --git a/sys-apps/pcmciautils/pcmciautils-018_p8-r3.ebuild 
b/sys-apps/pcmciautils/pcmciautils-018_p8-r3.ebuild
index d27c8288425f..e42d81c1d8d8 100644
--- a/sys-apps/pcmciautils/pcmciautils-018_p8-r3.ebuild
+++ b/sys-apps/pcmciautils/pcmciautils-018_p8-r3.ebuild
@@ -24,6 +24,13 @@ DEPEND="${RDEPEND}
 
 S=${WORKDIR}/${PN}-${MY_PV}
 
+PATCHES=(
+       "${WORKDIR}"/debian/patches/no-modprobe-rules.patch
+       "${WORKDIR}"/debian/patches/remove-libsysfs-dep.patch
+       "${FILESDIR}"/${P}-flex-2.6.3-fix.patch
+       "${FILESDIR}"/${PN}-018_p8-musl-unsigned-type.patch
+)
+
 pkg_setup() {
        CONFIG_CHECK="~PCMCIA"
        linux-info_pkg_setup
@@ -49,12 +56,6 @@ pkg_setup() {
        use debug && append-cppflags -DDEBUG
 }
 
-PATCHES=(
-       "${WORKDIR}"/debian/patches/no-modprobe-rules.patch
-       "${WORKDIR}"/debian/patches/remove-libsysfs-dep.patch
-       "${FILESDIR}"/${P}-flex-2.6.3-fix.patch
-)
-
 src_prepare() {
        default
        sed -i \

Reply via email to