From eb132d8196f11f2a84a44ce6076ad8e8b8c75e32 Mon Sep 17 00:00:00 2001 From: derselbst Date: Thu, 30 Aug 2018 21:43:55 +0200 Subject: [PATCH] correctly typedef fluid_stat_buf_t for glib < 2.26 --- src/utils/fluid_sys.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/utils/fluid_sys.h b/src/utils/fluid_sys.h index f8b13ef8..a56a2410 100644 --- a/src/utils/fluid_sys.h +++ b/src/utils/fluid_sys.h @@ -373,14 +373,17 @@ fluid_ostream_t fluid_socket_get_ostream(fluid_socket_t sock); /* File access */ #if !GLIB_CHECK_VERSION(2, 26, 0) - /* GStatBuf has not been introduced yet, manually typedef it, stolen from GLib 2.57.3: - * https://github.com/GNOME/glib/blob/90815c160b1c2cc15821e0dffa44ff7c4aa2787c/glib/gstdio.h#L28-L55 + /* GStatBuf has not been introduced yet, manually typedef to what they had at that time: + * https://github.com/GNOME/glib/blob/e7763678b56e3be073cc55d707a6e92fc2055ee0/glib/gstdio.h#L98-L115 */ - #if (defined (__MINGW64_VERSION_MAJOR) || defined (_MSC_VER)) && !defined(_WIN64) - typedef struct _stat32 fluid_stat_buf_t; - #elif defined(__MINGW64_VERSION_MAJOR) && defined(_WIN64) - typedef struct _stat64 fluid_stat_buf_t; + #if defined(WIN32) || HAVE_WINDOWS_H // somehow reliably mock G_OS_WIN32?? + #if defined (_MSC_VER) && !defined(_WIN64) + typedef struct _stat32 fluid_stat_buf_t; + #else + typedef struct _stat fluid_stat_buf_t; + #endif #else + /* posix, OS/2, etc. */ typedef struct stat fluid_stat_buf_t; #endif #else