From d0e0f5dd126d37a27a43cc00ed351ed1289c203c Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Fri, 15 May 2015 08:48:53 -0700 Subject: 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. --- node/Constants.hpp | 2 +- node/Utils.hpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'node') diff --git a/node/Constants.hpp b/node/Constants.hpp index 10c48c20..3bda685d 100644 --- a/node/Constants.hpp +++ b/node/Constants.hpp @@ -60,7 +60,7 @@ #include #endif -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) || defined(__OpenBSD__) #ifndef __UNIX_LIKE__ #define __UNIX_LIKE__ #endif diff --git a/node/Utils.hpp b/node/Utils.hpp index 585c7f5b..bdd673a9 100644 --- a/node/Utils.hpp +++ b/node/Utils.hpp @@ -331,7 +331,7 @@ public: throw() { #if __BYTE_ORDER == __LITTLE_ENDIAN -#ifdef __GNUC__ +#if defined(__GNUC__) && (!defined(__OpenBSD__)) return __builtin_bswap64(n); #else return ( @@ -361,7 +361,7 @@ public: throw() { #if __BYTE_ORDER == __LITTLE_ENDIAN -#ifdef __GNUC__ +#if defined(__GNUC__) && !defined(__OpenBSD__) return __builtin_bswap64(n); #else return ( -- cgit v1.2.3