Skip to content

Commit 454d6dd

Browse files
committed
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 <arpa/inet.h>, which defines the host to network byte order conversion functions.
1 parent 2948e96 commit 454d6dd

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

deps/nghttp2/lib/includes/config.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ typedef intptr_t ssize_t;
5454
/* #undef NOTHREADS */
5555

5656
/* Define to 1 if you have the <arpa/inet.h> header file. */
57-
/* #undef HAVE_ARPA_INET_H */
57+
#ifndef _WIN32
58+
# define HAVE_ARPA_INET_H 1
59+
#endif
5860

5961
/* Define to 1 if you have the <fcntl.h> header file. */
6062
#define HAVE_FCNTL_H 1

deps/nghttp2/nghttp2.gyp

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
'defines': [
1313
'BUILDING_NGHTTP2',
1414
'NGHTTP2_STATICLIB',
15+
'HAVE_CONFIG_H',
1516
],
1617
'conditions': [
1718
['OS=="win"', {
1819
'defines': [
1920
'WIN32',
2021
'_WINDOWS',
21-
'HAVE_CONFIG_H',
2222
],
2323
'msvs_settings': {
2424
'VCCLCompilerTool': {

0 commit comments

Comments
 (0)