Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: add defines to nghttp3/ngtcp2 gyp configs #33942

Closed

Commits on Jun 18, 2020

  1. 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.
    danbev committed Jun 18, 2020
    Copy the full SHA
    db858fc View commit details
    Browse the repository at this point in the history

Commits on Jun 21, 2020

  1. Copy the full SHA
    708f496 View commit details
    Browse the repository at this point in the history