nvme-cli: fix build on musl

This commit is contained in:
q66 2022-04-27 04:23:40 +02:00
parent f1b72a7e47
commit cfe44b4b9f
2 changed files with 25 additions and 1 deletions

View file

@ -0,0 +1,18 @@
commit ddf3610e8326d014360c9550d54a73f97b40e862
Author: q66 <daniel@octaforge.org>
Date: Wed Apr 27 04:20:41 2022 +0200
fix build on musl
diff --git a/util/base64.c b/util/base64.c
index e386c11..dad4492 100644
--- a/util/base64.c
+++ b/util/base64.c
@@ -22,6 +22,7 @@
#include <stdlib.h>
#include <string.h>
#include <errno.h>
+#include <sys/types.h>
static const char base64_table[65] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";

View file

@ -5,7 +5,7 @@ revision=1
build_style=meson
configure_args="-Ddocs=man -Dudevrulesdir=lib/udev/rules.d"
hostmakedepends="pkg-config"
makedepends="libnvme-devel zlib-devel json-c-devel libuuid-devel libhugetlbfs-devel"
makedepends="libnvme-devel zlib-devel json-c-devel libuuid-devel"
short_desc="NVMe management command line interface"
maintainer="Subhaditya Nath <sn03.general@gmail.com>"
license="GPL-2.0-only"
@ -14,6 +14,12 @@ distfiles="https://github.com/linux-nvme/nvme-cli/archive/v${version}.tar.gz"
checksum=471869b3bf643bb357dc9613ad14d24ff342fcd97e2db5a753c81c335ad8859c
conf_files="/etc/nvme/*.conf"
if [ "$XBPS_TARGET_LIBC" = "glibc" ]; then
makedepends+=" libhugetlbfs-devel"
else
CFLAGS="-D_GNU_SOURCE"
fi
post_install() {
# remove files that are systemd-only
rm -rf "${DESTDIR}/usr/lib/systemd"