From 31ef1961ec6ee57db910911b3af13698535ac7b3 Mon Sep 17 00:00:00 2001
From: Colin Walters <walters@verbum.org>
Date: Tue, 12 Dec 2017 14:14:53 -0500
Subject: [PATCH] fdio: Include libgen.h again for dirname()

rpm-ostree at least uses `dirname()` and relied on the `#include <libgen.h>`
that we had previously.
---
 glnx-fdio.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/glnx-fdio.h b/glnx-fdio.h
index 8af54ff23..c0a7cc1de 100644
--- a/glnx-fdio.h
+++ b/glnx-fdio.h
@@ -29,6 +29,8 @@
 #include <string.h>
 #include <stdio.h>
 #include <sys/xattr.h>
+// For dirname(), and previously basename()
+#include <libgen.h>
 
 #include <glnx-macros.h>
 #include <glnx-errors.h>
@@ -41,9 +43,7 @@ G_BEGIN_DECLS
 static inline
 const char *glnx_basename (const char *path)
 {
-  gchar *base;
-
-  base = strrchr (path, G_DIR_SEPARATOR);
+  gchar *base = strrchr (path, G_DIR_SEPARATOR);
 
   if (base)
     return base + 1;
-- 
GitLab