summary refs log tree commit diff stats
path: root/src/common/dcc.c
diff options
context:
space:
mode:
authorBerke Viktor <bviktor@hexchat.org>2012-10-24 18:34:07 +0200
committerBerke Viktor <bviktor@hexchat.org>2012-10-24 18:34:07 +0200
commit464b005c97aeffc74a7eb59f452bbc5e90032cb3 (patch)
tree19db7e5d35f418a8e5cb61b02c4f1474280190fa /src/common/dcc.c
parentaa917d568fa51597f94b6029bed460a839103a8a (diff)
Fix compilation on Unix with GLib 2.24 or older
Diffstat (limited to 'src/common/dcc.c')
-rw-r--r--src/common/dcc.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/common/dcc.c b/src/common/dcc.c
index 77ef2903..4aa581a7 100644
--- a/src/common/dcc.c
+++ b/src/common/dcc.c
@@ -69,6 +69,15 @@
 #define BIG_STR_TO_INT(x) strtoul(x,NULL,10)
 #endif
 
+/* This is practically copy-paste from gstdio.h.
+ * GStatBuf was added in 2.26. On Win32 we already use that,
+ * so we only gotta check this on Unix */
+#ifndef WIN32
+#if !GLIB_CHECK_VERSION(2,26,0)
+typedef struct stat GStatBuf;
+#endif
+#endif
+
 static char *dcctypes[] = { "SEND", "RECV", "CHAT", "CHAT" };
 
 struct dccstat_info dccstat[] = {