Loading base/include/android-base/endian.h +3 −1 Original line number Original line Diff line number Diff line Loading @@ -51,8 +51,10 @@ /* macOS has some of the basics. */ /* macOS has some of the basics. */ #include <sys/_endian.h> #include <sys/_endian.h> #else #else /* Windows has even less. */ /* Windows has some of the basics as well. */ #include <sys/param.h> #include <sys/param.h> #include <winsock2.h> /* winsock2.h *must* be included before the following four macros. */ #define htons(x) __builtin_bswap16(x) #define htons(x) __builtin_bswap16(x) #define htonl(x) __builtin_bswap32(x) #define htonl(x) __builtin_bswap32(x) #define ntohs(x) __builtin_bswap16(x) #define ntohs(x) __builtin_bswap16(x) Loading Loading
base/include/android-base/endian.h +3 −1 Original line number Original line Diff line number Diff line Loading @@ -51,8 +51,10 @@ /* macOS has some of the basics. */ /* macOS has some of the basics. */ #include <sys/_endian.h> #include <sys/_endian.h> #else #else /* Windows has even less. */ /* Windows has some of the basics as well. */ #include <sys/param.h> #include <sys/param.h> #include <winsock2.h> /* winsock2.h *must* be included before the following four macros. */ #define htons(x) __builtin_bswap16(x) #define htons(x) __builtin_bswap16(x) #define htonl(x) __builtin_bswap32(x) #define htonl(x) __builtin_bswap32(x) #define ntohs(x) __builtin_bswap16(x) #define ntohs(x) __builtin_bswap16(x) Loading