fix testing on sun
pull/786/head
Rick V 5 years ago
parent 908ac2722f
commit b3a975ff8e
No known key found for this signature in database
GPG Key ID: C0EDC8723FDC3465

@ -85,14 +85,12 @@ elseif (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR ${CMAKE_SYSTEM_NAME} MATCHES "
set(LIBTUNTAP_IMPL ${TT_ROOT}/tuntap-unix-freebsd.c ${TT_ROOT}/tuntap-unix-bsd.c)
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
find_library(FS_LIB NAMES c++fs c++experimental stdc++fs)
if(FS_LIB STREQUAL FS_LIB-NOTFOUND)
add_subdirectory(vendor)
include_directories("${CMAKE_CURRENT_LIST_DIR}/../vendor/cppbackport-master/lib")
add_definitions(-DLOKINET_USE_CPPBACKPORT)
set(FS_LIB cppbackport)
endif()
set(LIBTUNTAP_IMPL ${TT_ROOT}/tuntap-unix-darwin.c ${TT_ROOT}/tuntap-unix-bsd.c)
elseif (${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
set(LIBTUNTAP_IMPL ${TT_ROOT}/tuntap-unix-sunos.c)
@ -103,6 +101,8 @@ elseif (${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
include_directories("${CMAKE_CURRENT_LIST_DIR}/../vendor/cppbackport-master/lib")
add_definitions(-DLOKINET_USE_CPPBACKPORT)
set(FS_LIB cppbackport)
else()
set(FS_LIB stdc++fs)
endif()
else()
message(FATAL_ERROR "Your operating system is not supported yet")

@ -1,2 +1,3 @@
#pragma once
#include <stdint.h>
typedef int32_t crypto_int32;
typedef int32_t crypto_int32;

@ -1,2 +1,3 @@
#pragma once
#include <stdint.h>
typedef uint32_t crypto_uint32;
typedef uint32_t crypto_uint32;

@ -1,5 +1,4 @@
#include "params.h"
#include <sodium/crypto_uint32.h>
#include "rq.h"
void

@ -26,6 +26,10 @@ typedef unsigned int in_addr_t;
#include <sys/socket.h>
#endif
#ifndef __cplusplus
#include <stdbool.h>
#endif
#include <sys/types.h>
bool

@ -62,7 +62,7 @@ struct LinkLayerTest : public test::LlarpTest< NoOpCrypto >
localLoopBack()
{
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) \
|| (__APPLE__ && __MACH__)
|| (__APPLE__ && __MACH__) || (__sun)
return "lo0";
#else
return "lo";

@ -4739,7 +4739,7 @@ void UnitTest::AddTestPartResult(
((defined(__clang__) || defined(__GNUC__)) && \
(defined(__x86_64__) || defined(__i386__)))
// with clang/gcc we can achieve the same effect on x86 by invoking int3
asm("int3");
asm("int $0x3");
#else
// Dereference nullptr through a volatile pointer to prevent the compiler
// from removing. We use this rather than abort() or __builtin_trap() for

Loading…
Cancel
Save