From 454d6ddde73fd156497c56b86917a3f4d7ef5700 Mon Sep 17 00:00:00 2001 From: Sam Roberts Date: Wed, 17 Apr 2019 10:42:15 -0700 Subject: [PATCH] deps: use nghttp2's config.h on all platforms Fix warnings about use of htonl(), etc. by including config.h for all platforms, defining HAVE_ARPA_INET_H on non-Windows, and therefore including , which defines the host to network byte order conversion functions. --- deps/nghttp2/lib/includes/config.h | 4 +++- deps/nghttp2/nghttp2.gyp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/deps/nghttp2/lib/includes/config.h b/deps/nghttp2/lib/includes/config.h index 242bbcfb62ff7a..12a816e4ddadbb 100644 --- a/deps/nghttp2/lib/includes/config.h +++ b/deps/nghttp2/lib/includes/config.h @@ -54,7 +54,9 @@ typedef intptr_t ssize_t; /* #undef NOTHREADS */ /* Define to 1 if you have the header file. */ -/* #undef HAVE_ARPA_INET_H */ +#ifndef _WIN32 +# define HAVE_ARPA_INET_H 1 +#endif /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 diff --git a/deps/nghttp2/nghttp2.gyp b/deps/nghttp2/nghttp2.gyp index 8da81485e5f045..0dcd034b8169da 100644 --- a/deps/nghttp2/nghttp2.gyp +++ b/deps/nghttp2/nghttp2.gyp @@ -12,13 +12,13 @@ 'defines': [ 'BUILDING_NGHTTP2', 'NGHTTP2_STATICLIB', + 'HAVE_CONFIG_H', ], 'conditions': [ ['OS=="win"', { 'defines': [ 'WIN32', '_WINDOWS', - 'HAVE_CONFIG_H', ], 'msvs_settings': { 'VCCLCompilerTool': {