Skip to content

Commit

Permalink
port to freebsd
Browse files Browse the repository at this point in the history
  • Loading branch information
qrkourier committed Mar 29, 2024
1 parent d336721 commit 56189f8
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 2 deletions.
15 changes: 15 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,21 @@
"VCPKG_CHAINLOAD_TOOLCHAIN_FILE": "${sourceDir}/toolchains/Linux-arm.cmake"
}
},
{
"name": "ci-freebsd-x64",
"inherits": [
"ci-build",
"ci-unix",
"dev-mode",
"vcpkg"
],
"cacheVariables": {
"CMAKE_MAKE_PROGRAM": "ninja",
"CMAKE_C_COMPILER": "clang",
"CMAKE_CXX_COMPILER": "clang++",
"VCPKG_TARGET_TRIPLET": "x64-freebsd"
}
},
{
"name": "ci-windows-x64",
"inherits": [
Expand Down
2 changes: 1 addition & 1 deletion inc_internal/metrics.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <atomic>
using namespace std;
#else
#if defined(__linux)
#if defined(__linux) || defined(__FreeBSD__)

/* 20230621:NFRAGALE@NETFOUNDRY:Build assurance against a missing macro in features.h. */
# if defined __GNUC__ && defined __GNUC_MINOR__ && ! __clang__
Expand Down
2 changes: 1 addition & 1 deletion library/endian_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#endif


#if defined(__linux__)
#if defined(__linux__) || defined(__FreeBSD__)
# include <endian.h>
#elif defined (__APPLE__)
# include <libkern/OSByteOrder.h>
Expand Down
2 changes: 2 additions & 0 deletions library/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
#define ZITI_OS Android
#elif defined(__linux__)
#define ZITI_OS Linux
#elif defined(__FreeBSD__)
#define ZITI_OS FreeBSD
#elif defined(__APPLE__)
#define ZITI_OS MacOS
#else
Expand Down
1 change: 1 addition & 0 deletions tests/zitilib-tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#if _WIN32
#else
#include <unistd.h>
#include <sys/socket.h>
#endif

class testRunListener : public Catch::EventListenerBase {
Expand Down

0 comments on commit 56189f8

Please sign in to comment.