bluealsa: Fix build on musl

Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Khem Raj 2024-08-24 17:11:22 -07:00
parent fa2398e999
commit f7fe2415e1
No known key found for this signature in database
GPG Key ID: BB053355919D3314
2 changed files with 90 additions and 1 deletions

View File

@ -0,0 +1,88 @@
From 070ed35ac5cef8138ed4760582bb72e8d3e136e2 Mon Sep 17 00:00:00 2001
From: Arkadiusz Bokowy <arkadiusz.bokowy@gmail.com>
Date: Sun, 25 Aug 2024 08:42:39 +0200
Subject: [PATCH] Fix compilation on strict POSIX platforms
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream-Status: Submitted [https://github.com/arkq/bluez-alsa/commit/070ed35ac5cef8138ed4760582bb72e8d3e136e2]
---
src/main.c | 2 +-
test/mock/mock.c | 2 +-
utils/aplay/aplay.c | 1 +
utils/cli/cli.c | 1 +
utils/rfcomm/rfcomm.c | 1 +
5 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/main.c b/src/main.c
index 96a66aee..eeb80165 100644
--- a/src/main.c
+++ b/src/main.c
@@ -13,13 +13,13 @@
#endif
#include <getopt.h>
+#include <libgen.h>
#include <sched.h>
#include <signal.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
-#include <string.h>
#include <strings.h>
#include <syslog.h>
#include <time.h>
diff --git a/test/mock/mock.c b/test/mock/mock.c
index 947211a3..0a2f6091 100644
--- a/test/mock/mock.c
+++ b/test/mock/mock.c
@@ -20,12 +20,12 @@
#include <assert.h>
#include <errno.h>
#include <getopt.h>
+#include <libgen.h>
#include <signal.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
-#include <string.h>
#include <strings.h>
#include <sys/stat.h>
#include <unistd.h>
diff --git a/utils/aplay/aplay.c b/utils/aplay/aplay.c
index 3de77902..36843e95 100644
--- a/utils/aplay/aplay.c
+++ b/utils/aplay/aplay.c
@@ -15,6 +15,7 @@
#include <assert.h>
#include <errno.h>
#include <getopt.h>
+#include <libgen.h>
#include <math.h>
#include <poll.h>
#include <pthread.h>
diff --git a/utils/cli/cli.c b/utils/cli/cli.c
index aeeabe58..0338b9e2 100644
--- a/utils/cli/cli.c
+++ b/utils/cli/cli.c
@@ -13,6 +13,7 @@
#endif
#include <getopt.h>
+#include <libgen.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
diff --git a/utils/rfcomm/rfcomm.c b/utils/rfcomm/rfcomm.c
index d01f0810..3dacfd67 100644
--- a/utils/rfcomm/rfcomm.c
+++ b/utils/rfcomm/rfcomm.c
@@ -15,6 +15,7 @@
#include <ctype.h>
#include <errno.h>
#include <getopt.h>
+#include <libgen.h>
#include <poll.h>
#include <stdbool.h>
#include <stdint.h>

View File

@ -16,7 +16,8 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=143bc4e73f39cc5e89d6e096ac0315ba"
DEPENDS += "alsa-lib bluez5 dbus glib-2.0-native python3-packaging-native sbc"
SRC_URI = "git://github.com/Arkq/bluez-alsa.git;protocol=https;branch=master"
SRC_URI = "git://github.com/Arkq/bluez-alsa.git;protocol=https;branch=master \
file://0001-Use-basename-implementation-from-glib-2.0.patch"
SRCREV = "959573c2cccef5cf074f5b2fa7941abbd699c5f4"