summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2020-11-22 19:06:14 +0000
committerColin Walters <walters@verbum.org>2020-11-22 19:11:31 +0000
commitefcacc4c5fc8a94d3a202c6c6549c155a14600e4 (patch)
treeef7d01471f57c16b5324550dd1e4111cf7cfe0c3
parent493d399b190d7c2025edb865e1decb67c8d14d2b (diff)
downloadlibglnx-efcacc4c5fc8a94d3a202c6c6549c155a14600e4.tar.gz
fdio: Fix compilation via C++
I may use https://cxx.rs/ in rpm-ostree, which means we need our dependencies' headers to build in C++ mode.
-rw-r--r--glnx-fdio.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/glnx-fdio.h b/glnx-fdio.h
index cc1ed4b..40931bf 100644
--- a/glnx-fdio.h
+++ b/glnx-fdio.h
@@ -43,7 +43,7 @@ G_BEGIN_DECLS
static inline
const char *glnx_basename (const char *path)
{
- gchar *base = strrchr (path, G_DIR_SEPARATOR);
+ const gchar *base = strrchr (path, G_DIR_SEPARATOR);
if (base)
return base + 1;
@@ -55,7 +55,7 @@ const char *glnx_basename (const char *path)
static inline void
glnx_stdio_file_cleanup (void *filep)
{
- FILE *f = filep;
+ FILE *f = (FILE*)filep;
if (f)
fclose (f);
}