mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-04-28 23:10:02 +00:00
Basic OpenBSD compile fixes -- still need to update BSDEthernetTap, will do that later. Should be able to re-use FreeBSD port for OpenBSD, but we will see.
This commit is contained in:
parent
e94518590d
commit
d0e0f5dd12
4
Makefile
4
Makefile
@ -13,4 +13,6 @@ endif
|
|||||||
ifeq ($(OSTYPE),FreeBSD)
|
ifeq ($(OSTYPE),FreeBSD)
|
||||||
include make-freebsd.mk
|
include make-freebsd.mk
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(OSTYPE),OpenBSD)
|
||||||
|
include make-freebsd.mk
|
||||||
|
endif
|
||||||
|
@ -43,6 +43,8 @@
|
|||||||
#else /* not Windows */
|
#else /* not Windows */
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
#endif /* Windows or not */
|
#endif /* Windows or not */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -60,7 +60,7 @@
|
|||||||
#include <endian.h>
|
#include <endian.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __FreeBSD__
|
#if defined(__FreeBSD__) || defined(__OpenBSD__)
|
||||||
#ifndef __UNIX_LIKE__
|
#ifndef __UNIX_LIKE__
|
||||||
#define __UNIX_LIKE__
|
#define __UNIX_LIKE__
|
||||||
#endif
|
#endif
|
||||||
|
@ -331,7 +331,7 @@ public:
|
|||||||
throw()
|
throw()
|
||||||
{
|
{
|
||||||
#if __BYTE_ORDER == __LITTLE_ENDIAN
|
#if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||||
#ifdef __GNUC__
|
#if defined(__GNUC__) && (!defined(__OpenBSD__))
|
||||||
return __builtin_bswap64(n);
|
return __builtin_bswap64(n);
|
||||||
#else
|
#else
|
||||||
return (
|
return (
|
||||||
@ -361,7 +361,7 @@ public:
|
|||||||
throw()
|
throw()
|
||||||
{
|
{
|
||||||
#if __BYTE_ORDER == __LITTLE_ENDIAN
|
#if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||||
#ifdef __GNUC__
|
#if defined(__GNUC__) && !defined(__OpenBSD__)
|
||||||
return __builtin_bswap64(n);
|
return __builtin_bswap64(n);
|
||||||
#else
|
#else
|
||||||
return (
|
return (
|
||||||
|
@ -70,6 +70,10 @@ namespace ZeroTier { typedef LinuxEthernetTap EthernetTap; }
|
|||||||
#include "../osdep/WindowsEthernetTap.hpp"
|
#include "../osdep/WindowsEthernetTap.hpp"
|
||||||
namespace ZeroTier { typedef WindowsEthernetTap EthernetTap; }
|
namespace ZeroTier { typedef WindowsEthernetTap EthernetTap; }
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef __BSD__
|
||||||
|
#include "../osdep/BSDEthernetTap.hpp"
|
||||||
|
namespace ZeroTier { typedef BSDEthernetTap EthernetTap; }
|
||||||
|
#endif
|
||||||
|
|
||||||
// Sanity limits for HTTP
|
// Sanity limits for HTTP
|
||||||
#define ZT_MAX_HTTP_MESSAGE_SIZE (1024 * 1024 * 8)
|
#define ZT_MAX_HTTP_MESSAGE_SIZE (1024 * 1024 * 8)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user