aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRui Abreu Ferreira <raf-ep@gmx.com>2016-04-29 21:17:58 +0100
committerRui Abreu Ferreira <raf-ep@gmx.com>2016-04-30 20:30:11 +0100
commite4903f8b70057e64e07ac1e6eaab42f1153df8ff (patch)
treeba456e3dd187f9716124dcaebaa0af1cfb47afb9
parent3dc8cdc1504edfd1ab44d9151954f859ab9befe2 (diff)
downloadrneovim-e4903f8b70057e64e07ac1e6eaab42f1153df8ff.tar.gz
rneovim-e4903f8b70057e64e07ac1e6eaab42f1153df8ff.tar.bz2
rneovim-e4903f8b70057e64e07ac1e6eaab42f1153df8ff.zip
Windows: Include winsock2.h before windows.h
winsock2.h is incompatible with winsock.h (included by windows.h) and must be included first. For reference see https://msdn.microsoft.com/en-us/library/windows/desktop/ms737629%28v=vs.85%29.aspx
-rw-r--r--src/nvim/os/win_defs.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/os/win_defs.h b/src/nvim/os/win_defs.h
index 242d355f77..55894e4d12 100644
--- a/src/nvim/os/win_defs.h
+++ b/src/nvim/os/win_defs.h
@@ -1,6 +1,9 @@
#ifndef NVIM_OS_WIN_DEFS_H
#define NVIM_OS_WIN_DEFS_H
+// winsock2.h must be first to avoid incompatibilities
+// with winsock.h (included by windows.h)
+#include <winsock2.h>
#include <windows.h>
#include <sys/stat.h>
#include <io.h>