From 61c1ac9ab4569e80e868265e4f31ed4768bc558c Mon Sep 17 00:00:00 2001 From: Pietro Cerutti Date: Thu, 2 Oct 2014 12:20:26 +0200 Subject: [PATCH] Do not define bswap32 on FreebSD (and OpenBSD I guess). Then, netinet/tcp.h requires sys/types.h --- mtproto-client.c | 2 +- net.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mtproto-client.c b/mtproto-client.c index 98874d6..5c06148 100644 --- a/mtproto-client.c +++ b/mtproto-client.c @@ -80,7 +80,7 @@ #define MAX_NET_RES (1L << 16) //extern int log_level; -#ifndef HAVE___BUILTIN_BSWAP32 +#if !defined(HAVE___BUILTIN_BSWAP32) && !defined(__FreeBSD__) && !defined(__OpenBSD__) static inline unsigned __builtin_bswap32(unsigned x) { return ((x << 24) & 0xff000000 ) | ((x << 8) & 0x00ff0000 ) | diff --git a/net.c b/net.c index 8c682d5..b8af790 100644 --- a/net.c +++ b/net.c @@ -26,11 +26,11 @@ #include #include #include +#include #include #include #include #include -#include #include #include #include