From 8cd1ff7a4538a0a14debd2e6b383422a1a20b9a6 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 12 Jan 2016 15:25:15 +0100 Subject: [PATCH] Use MAKEWORD macro in WSAStartup call per documentation * autoload.cc (wsock_init): Use MAKEWORD macro to create requested version rather than handcrafted expression. Signed-off-by: Corinna Vinschen --- winsup/cygwin/autoload.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/cygwin/autoload.cc b/winsup/cygwin/autoload.cc index 7158e952b..08b218818 100644 --- a/winsup/cygwin/autoload.cc +++ b/winsup/cygwin/autoload.cc @@ -523,7 +523,7 @@ wsock_init () GetProcAddress ((HMODULE) (dll->handle), "WSAStartup"); if (wsastartup) { - int res = wsastartup ((2<<8) | 2, &wsadata); + int res = wsastartup (MAKEWORD (2, 2), &wsadata); debug_printf ("res %d", res); debug_printf ("wVersion %d", wsadata.wVersion);