From: Jeremy Philippe Date: Sun, 1 Sep 2019 22:47:42 +0000 (+0200) Subject: glib-2.0: Use 'GStatBuf' as ctype for 'Stat' X-Git-Tag: 0.46.0~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e8830f4055493de50712fb157d06b76ca348f5dc;p=thirdparty%2Fvala.git glib-2.0: Use 'GStatBuf' as ctype for 'Stat' The documentation of g_stat () states: In Microsoft's compiler, by default struct stat means one with 64-bit time fields while in MinGW struct stat is the legacy one with 32-bit fields. To hopefully clear up this mess, the gstdio.h header defines a type GStatBuf which is the appropriate struct type depending on the platform and/or compiler being used. On POSIX it is just struct stat, but note that even on POSIX platforms, stat() might be a macro. --- diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi index 3b3e4569f..966abb518 100644 --- a/vapi/glib-2.0.vapi +++ b/vapi/glib-2.0.vapi @@ -3749,7 +3749,7 @@ namespace GLib { public static bool close_checked (int fd) throws FileError; } - [CCode (cname = "struct stat", cheader_filename = "sys/stat.h,glib/gstdio.h")] + [CCode (cname = "GStatBuf", cheader_filename = "glib/gstdio.h")] public struct Stat { public time_t st_atime; public time_t st_mtime;