Skip to content

uvcgadget: Use g_path_get_basename instead of libc basename

Khem Raj requested to merge kraj/gstreamer:kraj/basename into main

Musl does not implement GNU basename and have fixed a bug where the prototype was leaked into string.h [1], which resullts in compile errors with GCC-14 and Clang-17+

| ../gst-plugins-bad-1.24.3/sys/uvcgadget/configfs.c:262:21: error: call to undeclared function 'basename'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] | 262 | const char *v = basename (globbuf.gl_pathv[i]); | | ^

Use glib function instead makes it portable across musl and glibc on linux

[1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7a

Signed-off-by: Khem Raj raj.khem@gmail.com

Merge request reports