Blame SOURCES/fix-build.patch

b0c5b1
libglnx: throw in custom basename implementation
b0c5b1
b0c5b1
libglnx tries to avoid using a specific implementation of basename by
b0c5b1
doing #undef basename.  This trick doesn't work with glibc anymore
b0c5b1
apparently.
b0c5b1
b0c5b1
But basename is like 3 lines of code to write, so just write it.
b0c5b1
b0c5b1
diff --git a/libglnx/glnx-fdio.h b/libglnx/glnx-fdio.h
b0c5b1
--- a/libglnx/glnx-fdio.h	2017-11-08 13:41:49.734931484 -0500
b0c5b1
+++ b/libglnx/glnx-fdio.h	2017-11-08 13:45:33.330758205 -0500
b0c5b1
@@ -43,7 +43,14 @@ G_BEGIN_DECLS
b0c5b1
 static inline
b0c5b1
 const char *glnx_basename (const char *path)
b0c5b1
 {
b0c5b1
-  return (basename) (path);
b0c5b1
+  gchar *base;
b0c5b1
+
b0c5b1
+  base = strrchr (path, G_DIR_SEPARATOR);
b0c5b1
+
b0c5b1
+  if (base)
b0c5b1
+    return base + 1;
b0c5b1
+
b0c5b1
+  return path;
b0c5b1
 }
b0c5b1
 
b0c5b1
 gboolean
b0c5b1
diff --git a/libostree-2017.2/libglnx/glnx-fdio.h b/libostree-2017.2/libglnx/glnx-fdio.h
b0c5b1
--- a/libostree-2017.2/libglnx/glnx-fdio.h	2017-11-08 13:53:45.655413948 -0500
b0c5b1
+++ b/libostree-2017.2/libglnx/glnx-fdio.h	2017-11-08 13:53:57.543285889 -0500
b0c5b1
@@ -43,7 +43,14 @@ G_BEGIN_DECLS
b0c5b1
 static inline
b0c5b1
 const char *glnx_basename (const char *path)
b0c5b1
 {
b0c5b1
-  return (basename) (path);
b0c5b1
+  gchar *base;
b0c5b1
+
b0c5b1
+  base = strrchr (path, G_DIR_SEPARATOR);
b0c5b1
+
b0c5b1
+  if (base)
b0c5b1
+    return base + 1;
b0c5b1
+
b0c5b1
+  return path;
b0c5b1
 }
b0c5b1
 
b0c5b1
 gboolean