diff mbox series

[BlueZ] tools/hex2hcd: fix musl compatibility

Message ID 20240710165459.26813-1-rahul@sandhuservices.dev
State New
Headers show
Series [BlueZ] tools/hex2hcd: fix musl compatibility | expand

Commit Message

Rahul Sandhu July 10, 2024, 4:54 p.m. UTC
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(-)

Comments

bluez.test.bot@gmail.com July 10, 2024, 5:12 p.m. UTC | #1
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
Rahul Sandhu July 10, 2024, 6:18 p.m. UTC | #2
Hello, I made a mistake generating the V2 patch. Sincere apologies. Please disregard this thread. I will generate V3 shortly.
diff mbox series

Patch

diff --git a/tools/hex2hcd.c b/tools/hex2hcd.c
index 42c95b759..28f0e8be2 100644
--- a/tools/hex2hcd.c
+++ b/tools/hex2hcd.c
@@ -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)