[libglnx] fdio: Fix compilation via C++
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libglnx] fdio: Fix compilation via C++
- Date: Sun, 22 Nov 2020 19:12:47 +0000 (UTC)
commit efcacc4c5fc8a94d3a202c6c6549c155a14600e4
Author: Colin Walters <walters verbum org>
Date: Sun Nov 22 19:06:14 2020 +0000
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.
glnx-fdio.h | 4 ++--
1 file 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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]