]> mj.ucw.cz Git - pciutils.git/commitdiff
sysfs: Include <libgen.h> for basename()
authorMartin Mares <mj@ucw.cz>
Mon, 27 May 2024 12:21:29 +0000 (14:21 +0200)
committerMartin Mares <mj@ucw.cz>
Mon, 27 May 2024 12:21:29 +0000 (14:21 +0200)
Otherwise, it fails to build with musl libc.

lib/sysfs.c

index 0e763dcbb9124e532c7863cdf60580583f3c1b64..439c4cbd6aa01538ce99529602c86cdd9fde439b 100644 (file)
@@ -2,7 +2,7 @@
  *     The PCI Library -- Configuration Access via /sys/bus/pci
  *
  *     Copyright (c) 2003 Matthew Wilcox <matthew@wil.cx>
- *     Copyright (c) 1997--2023 Martin Mares <mj@ucw.cz>
+ *     Copyright (c) 1997--2024 Martin Mares <mj@ucw.cz>
  *
  *     Can be freely distributed and used under the terms of the GNU GPL v2+.
  *
@@ -19,6 +19,7 @@
 #include <errno.h>
 #include <dirent.h>
 #include <fcntl.h>
+#include <libgen.h>
 #include <sys/types.h>
 
 #include "internal.h"