Skip to content
Snippets Groups Projects
Commit 31ef1961 authored by Colin Walters's avatar Colin Walters
Browse files

fdio: Include libgen.h again for dirname()

rpm-ostree at least uses `dirname()` and relied on the `#include <libgen.h>`
that we had previously.
parent 03b48a39
No related branches found
No related tags found
No related merge requests found
...@@ -29,6 +29,8 @@ ...@@ -29,6 +29,8 @@
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
#include <sys/xattr.h> #include <sys/xattr.h>
// For dirname(), and previously basename()
#include <libgen.h>
#include <glnx-macros.h> #include <glnx-macros.h>
#include <glnx-errors.h> #include <glnx-errors.h>
...@@ -41,9 +43,7 @@ G_BEGIN_DECLS ...@@ -41,9 +43,7 @@ G_BEGIN_DECLS
static inline static inline
const char *glnx_basename (const char *path) const char *glnx_basename (const char *path)
{ {
gchar *base; gchar *base = strrchr (path, G_DIR_SEPARATOR);
base = strrchr (path, G_DIR_SEPARATOR);
if (base) if (base)
return base + 1; return base + 1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment