Skip to contentSkip to conversation

tools/hex2hcd: fix musl compatibility

PATCH Superseded Rahul Sandhu 2 participants 3 messages Jul 10, 2024 Bluetooth drivers

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools/hex2hcd: fix musl compatibility

The call to basename() relies on a GNU extension
to take a const char * vs a char *. Let's define
a trivial helper function to ensure compatibility
with musl.

Downstream gentoo bug: https://bugs.gentoo.org/926344
Fixes: #843

---
 tools/hex2hcd.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
tools/hex2hcd.c +5 -3
index 42c95b759..28f0e8be2 100644
@@ -285,9 +285,11 @@ static void ver_parse_file(const char *pathname)
 	prev->next = ver;
 }
 
-static const char *helper_basename(const char *path) {
-  const char *base = strrchr(path, '/');
-  return base ? base + 1 : path;
+static const char *helper_basename(const char *path)
+{
+	const char *base = strrchr(path, '/');
+
+	return base ? base + 1 : path;
 }
 
 static void ver_parse_entry(const char *pathname)
Signature · 1 line
2.45.2
#1 lore raw

This is an automated email and please do not reply to this email.

Dear Submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
While preparing the CI tests, the patches you submitted couldn't be applied to the current HEAD of the repository.

----- Output -----

error: patch failed: tools/hex2hcd.c:285
error: tools/hex2hcd.c: patch does not apply
hint: Use 'git am --show-current-patch' to see the failed patch

Please resolve the issue and submit the patches again.

---
Regards,
Linux Bluetooth