Edit

kc3-lang/libressl/include/compat/resolv.h

Branch :

  • Browse

    Commit

  • Author : Jonas 'Sortie' Termansen
    Date : 2021-10-03 13:33:16
    Hash : fcf6c877
    Message : Support operating systems without some non-POSIX headers The arpa/nameser.h, netinet/ip.h, and resolv.h headers are not crucial to building LibreSSL. The netinet/ip.h header is used in nc(1) for optional IPTOS_ features that can be ifdef'd on systems without support. The endian.h header is the upcoming standard header and should be used whenever available and correct. The machine/endian.h header is non-standard and doesn't have to exist on POSIX systems. Fix the check for getpagesize(3) not forward declaring the function, such that CFLAGS with -Werror=implicit-function-declaration doesn't cause the check to fail.

  • include/compat/resolv.h
  • /*
     * Public domain
     * resolv.h compatibility shim
     */
    
    #ifndef LIBCRYPTOCOMPAT_RESOLV_H
    #define LIBCRYPTOCOMPAT_RESOLV_H
    
    #ifdef _MSC_VER
    #if _MSC_VER >= 1900
    #include <../ucrt/resolv.h>
    #else
    #include <../include/resolv.h>
    #endif
    #elif defined(HAVE_RESOLV_H)
    #include_next <resolv.h>
    #endif
    
    #ifndef HAVE_B64_NTOP
    int b64_ntop(unsigned char const *, size_t, char *, size_t);
    int b64_pton(char const *, unsigned char *, size_t);
    #endif
    
    #endif