Commit 4e960fdd authored by vysheng's avatar vysheng

Merge pull request #266 from gahr/freebsd-fixes

FreeBSD-specific fixes
parents 641f9a8e 61c1ac9a
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
#define MAX_NET_RES (1L << 16) #define MAX_NET_RES (1L << 16)
//extern int log_level; //extern int log_level;
#ifndef HAVE___BUILTIN_BSWAP32 #if !defined(HAVE___BUILTIN_BSWAP32) && !defined(__FreeBSD__) && !defined(__OpenBSD__)
static inline unsigned __builtin_bswap32(unsigned x) { static inline unsigned __builtin_bswap32(unsigned x) {
return ((x << 24) & 0xff000000 ) | return ((x << 24) & 0xff000000 ) |
((x << 8) & 0x00ff0000 ) | ((x << 8) & 0x00ff0000 ) |
......
...@@ -26,11 +26,11 @@ ...@@ -26,11 +26,11 @@
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#include <assert.h> #include <assert.h>
#include <sys/types.h>
#include <netdb.h> #include <netdb.h>
#include <netinet/in.h> #include <netinet/in.h>
#include <netinet/tcp.h> #include <netinet/tcp.h>
#include <sys/fcntl.h> #include <sys/fcntl.h>
#include <sys/types.h>
#include <sys/socket.h> #include <sys/socket.h>
#include <errno.h> #include <errno.h>
#include <stdio.h> #include <stdio.h>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment