Skip to content
Snippets Groups Projects
Unverified Commit 6508b36f authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa Committed by GitHub
Browse files

Merge pull request #255 from jasnell/fixup-winsock

Use winsock.h on windows instead of sys/socket.h
parents 5862aa84 0a59009a
Branches
No related merge requests found
......@@ -46,10 +46,15 @@ extern "C" {
# include <inttypes.h>
#endif /* !defined(_MSC_VER) || (_MSC_VER >= 1800) */
#include <sys/types.h>
#include <sys/socket.h>
#include <stdarg.h>
#include <stddef.h>
#ifdef WIN32
# include <winsock2.h>
#else
# include <sys/socket.h>
#endif
#include <ngtcp2/version.h>
#ifdef NGTCP2_STATICLIB
......
......@@ -26,7 +26,18 @@
#include <string.h>
#include <assert.h>
#include <netinet/ip.h>
#ifdef WIN32
# include <winsock2.h>
# include <ws2tcpip.h>
#else
# include <sys/types.h>
# include <sys/socket.h>
# include <netinet/in.h>
# include <netinet/ip.h>
# include <netinet/tcp.h>
# include <arpa/inet.h>
#endif
ngtcp2_addr *ngtcp2_addr_init(ngtcp2_addr *dest, const struct sockaddr *addr,
size_t addrlen, void *user_data) {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment