Edit

kc3-lang/libressl/include/compat/netinet/ip.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/netinet/ip.h
  • /*
     * Public domain
     * netinet/ip.h compatibility shim
     */
    
    #if defined(__hpux)
    #include <netinet/in_systm.h>
    #endif
    
    #ifndef _WIN32
    #ifdef HAVE_NETINET_IP_H
    #include_next <netinet/ip.h>
    #endif
    #else
    #include <win32netcompat.h>
    #endif
    
    /*
     * Definitions for DiffServ Codepoints as per RFC2474
     */
    #ifndef IPTOS_DSCP_CS0
    #define	IPTOS_DSCP_CS0		0x00
    #define	IPTOS_DSCP_CS1		0x20
    #define	IPTOS_DSCP_CS2		0x40
    #define	IPTOS_DSCP_CS3		0x60
    #define	IPTOS_DSCP_CS4		0x80
    #define	IPTOS_DSCP_CS5		0xa0
    #define	IPTOS_DSCP_CS6		0xc0
    #define	IPTOS_DSCP_CS7		0xe0
    #endif
    
    #ifndef IPTOS_DSCP_AF11
    #define	IPTOS_DSCP_AF11		0x28
    #define	IPTOS_DSCP_AF12		0x30
    #define	IPTOS_DSCP_AF13		0x38
    #define	IPTOS_DSCP_AF21		0x48
    #define	IPTOS_DSCP_AF22		0x50
    #define	IPTOS_DSCP_AF23		0x58
    #define	IPTOS_DSCP_AF31		0x68
    #define	IPTOS_DSCP_AF32		0x70
    #define	IPTOS_DSCP_AF33		0x78
    #define	IPTOS_DSCP_AF41		0x88
    #define	IPTOS_DSCP_AF42		0x90
    #define	IPTOS_DSCP_AF43		0x98
    #endif
    
    #ifndef IPTOS_DSCP_EF
    #define	IPTOS_DSCP_EF		0xb8
    #endif