Skip to contentSkip to conversation

utest/trace-utest: include libgen.h

PATCH New Miko Larsson 1 participant 1 message Feb 22, 2024

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 utest/trace-utest: include libgen.h

This fixes the build with musl + clang >=15; musl doesn't define basename() anywhere else, and clang >=15 doesn't allow implicit declarations.

Fixes 58cbc1b2a84e ("libtraceevent: Add unit test framework for library commands")

---
Changes in v2:
- Better commit description, message
- Link to v1: https://lore.kernel.org/r/[email protected]

---
 utest/trace-utest.c | 1 +
 1 file changed, 1 insertion(+)
utest/trace-utest.c +1 -0
index 1403c86..a26e42e 100644
@@ -6,6 +6,7 @@
  *   Copyright (C) 2021, VMware, Steven Rostedt <[email protected]>
  *
  */
+#include <libgen.h>
 #include <stdio.h>
 #include <unistd.h>
 #include <getopt.h>

---
base-commit: 6f6d5802f31992e7527a4c32b43a32fda6bf6bdf
change-id: 20240215-utest-fixes-cd5dcc3e853b

Best regards,

Signature · 1 line
Miko Larsson <[email protected]>