s390-tools: Fix compilation with musl and gcc 14

lscss.c: In function 'is_sch_vfio':
lscss.c:392:20: error: implicit declaration of function 'basename' [-Wimplicit-function-declaration]
  392 |         if (strcmp(basename(driver_path), "vfio_ccw") == 0)

device.c: In function 'device_read_active_attrib':
device.c:426:45: error: implicit declaration of function 'basename'; did you mean 'rename'? [-Wimplicit-function-declaration]
  426 |                         value = misc_strdup(basename(link));
      |                                             ^~~~~~~~
      |                                             rename

Closes: https://github.com/ibm-s390-linux/s390-tools/pull/192
[hoeppner@linux.ibm.com: Sort includes]
Signed-off-by: L. E. Segovia <amy@amyspark.me>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
L. E. Segovia
2024-08-04 14:04:23 -03:00
committed by Jan Höppner
parent 2c31ed6f14
commit 33bd112e2f
5 changed files with 5 additions and 0 deletions

View File

@@ -7,6 +7,7 @@
* it under the terms of the MIT license. See LICENSE for details.
*/
#include <libgen.h>
#include <stdio.h>
#include <stdlib.h>

View File

@@ -8,6 +8,7 @@
*/
#include <inttypes.h>
#include <libgen.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>

View File

@@ -7,6 +7,7 @@
* it under the terms of the MIT license. See LICENSE for details.
*/
#include <libgen.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

View File

@@ -7,6 +7,7 @@
* it under the terms of the MIT license. See LICENSE for details.
*/
#include <libgen.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>

View File

@@ -7,6 +7,7 @@
* it under the terms of the MIT license. See LICENSE for details.
*/
#include <libgen.h>
#include <string.h>
#include "lib/util_path.h"