summary refs log tree commit diff stats
path: root/src/common/plugin.c
diff options
context:
space:
mode:
authorBerke Viktor <berkeviktor@aol.com>2011-11-30 03:40:07 +0100
committerBerke Viktor <berkeviktor@aol.com>2011-11-30 03:40:07 +0100
commit845c4915bf51d4d670f527275b99c7423708bbfc (patch)
treecb5ccd1c2fdb79eabe2def6baa6dde8a655cef0d /src/common/plugin.c
parentab3e3926abce49f0741edf90a1300d4cdcc79670 (diff)
plugin config unix compatibility part 1
Diffstat (limited to 'src/common/plugin.c')
-rw-r--r--src/common/plugin.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/common/plugin.c b/src/common/plugin.c
index 7bc39400..45109ee2 100644
--- a/src/common/plugin.c
+++ b/src/common/plugin.c
@@ -23,6 +23,12 @@
 #include <fcntl.h>
 #include <sys/stat.h>
 
+#ifdef WIN32
+#include <io.h>
+#else
+#include <unistd.h>
+#endif
+
 #include "xchat.h"
 #include "fe.h"
 #include "util.h"
@@ -1686,7 +1692,7 @@ xchat_get_plugin_pref (xchat_plugin *pl, char *var, char *dest)
 	g_free (canon);
 
 	/* partly borrowed from palette.c */
-	fh = xchat_open_file (confname, _O_RDONLY, 0, 0);
+	fh = xchat_open_file (confname, O_RDONLY, 0, 0);
 
 	if (fh == -1)
 	{