Skip to content

Commit 90cf2d5

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. PR-URL: #27283 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Refael Ackermann <[email protected]>
1 parent 72308a5 commit 90cf2d5

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)