void-packages/srcpkgs/lshw/patches/musl-basename.patch

16 lines
367 B
Diff

For musl libc declare a macro version of basename(3).
--- src/core/sysfs.cc 2016-05-07 05:36:45.771620396 +0200
+++ src/core/sysfs.cc 2016-05-07 05:37:33.265617827 +0200
@@ -19,6 +19,10 @@
__ID("@(#) $Id$");
+#if !defined(__GLIBC__)
+#define basename(src) (strrchr(src,'/') ? strrchr(src,'/')+1 : src)
+#endif
+
using namespace sysfs;
struct sysfs::entry_i