Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/deps
diff options
context:
space:
mode:
authorDaniel Bevenius <daniel.bevenius@gmail.com>2020-06-18 15:56:24 +0300
committerJames M Snell <jasnell@gmail.com>2020-06-22 21:03:10 +0300
commita0cbd676e7aeb8ba8c929453c24640cec140e061 (patch)
treebfbeb146334ab3bac16ab2f4afb52ce5f0521eaf /deps
parentc7d859e756794fdc1460444eb238affd432b7fd6 (diff)
deps: add defines to nghttp3/ngtcp2 gyp configs
This commit adds two defines to ngtcp2, 'HAVE_ARPA_INET_H' and 'HAVE_NETINET_IN_H', and one define to nghttp3, 'HAVE_ARPA_INET_H' when the operating system in use is linux. The motivation for this is that currently, there are compiler warnings generated for these libraries similar to the following: ../deps/ngtcp2/lib/ngtcp2_conv.c: In function ‘ngtcp2_put_uint16be’: ../deps/ngtcp2/lib/ngtcp2_conv.c:129:7: warning: implicit declaration of function ‘htons’ [-Wimplicit-function-declaration] 129 | n = htons(n); | ^~~~~ The inclusion of 'arpa/inet.h' is guarded by the 'HAVE_ARPA_INET_H' macro (see deps/ngtcp2/lib/ngtcp2_conv.h). These headers are checked by the ngtcp2 and nghttp3 builds using CMake's CheckIncludeFile, and if they are available the above macros are defined. I'm not sure if we need to have something similar to those checks or ifit is alright to add these defines for certain operating systems. Hopefully others will chime in and advice on how to handle this in the best way. PR-URL: https://github.com/nodejs/node/pull/33942 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'deps')
-rw-r--r--deps/nghttp3/nghttp3.gyp5
-rw-r--r--deps/ngtcp2/ngtcp2.gyp6
2 files changed, 11 insertions, 0 deletions
diff --git a/deps/nghttp3/nghttp3.gyp b/deps/nghttp3/nghttp3.gyp
index 3421ba7cf60..45904427bb1 100644
--- a/deps/nghttp3/nghttp3.gyp
+++ b/deps/nghttp3/nghttp3.gyp
@@ -26,6 +26,11 @@
},
},
}],
+ ['OS=="linux"', {
+ 'defines': [
+ 'HAVE_ARPA_INET_H',
+ ],
+ }],
],
'direct_dependent_settings': {
'defines': [ 'NGHTTP3_STATICLIB' ],
diff --git a/deps/ngtcp2/ngtcp2.gyp b/deps/ngtcp2/ngtcp2.gyp
index 1da2cba93dc..f86dcc5693e 100644
--- a/deps/ngtcp2/ngtcp2.gyp
+++ b/deps/ngtcp2/ngtcp2.gyp
@@ -33,6 +33,12 @@
},
},
}],
+ ['OS=="linux"', {
+ 'defines': [
+ 'HAVE_ARPA_INET_H',
+ 'HAVE_NETINET_IN_H',
+ ],
+ }],
],
'direct_dependent_settings': {
'defines': [ 'NGTCP2_STATICLIB' ],