lshw icon indicating copy to clipboard operation
lshw copied to clipboard

sysfs: Fix basename() build with musl

Open krzk opened this issue 6 years ago • 2 comments

musl provides only standard basename() which accepts non-const string. This fixes build error with musl C library:

| sysfs.cc: In function 'std::__cxx11::string sysfs_getbustype(const string&)':
| sysfs.cc:102:21: error: 'basename' was not declared in this scope
|        "/devices/" + basename(path.c_str());
|                      ^~~~~~~~

Signed-off-by: Krzysztof Kozlowski [email protected]

krzk avatar Jun 06 '18 11:06 krzk

@lyonel Can you take a look, please?

BKPepe avatar Dec 08 '20 18:12 BKPepe

Fixed in d3c66a6b2a0799d6982f4dc77b291934fcba80c9?

benkohler avatar Mar 23 '21 17:03 benkohler