Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit ddb1cea4 authored by Rob Swindell's avatar Rob Swindell 💬

Revert "Use atomics for protected-ints on other *nixes too (not just FreeBSD)"

This reverts commit e1e034cc.

Didn't work for .cpp files:
stdatomic.h:40:9: error: ‘_Atomic’ does not name a type
typedef _Atomic _Bool atomic_bool
parent e1e034cc
Pipeline #1354 failed with stage
in 9 minutes and 50 seconds
......@@ -217,7 +217,7 @@ int DLLCALL pthread_mutex_destroy(pthread_mutex_t* mutex)
/* Protected (thread-safe) Integers (e.g. atomic/interlocked variables) */
/************************************************************************/
#ifdef __unix__
#ifdef __FreeBSD__
#define PROTECTED_TYPE_INIT(type) \
int DLLCALL protected_##type##_init(protected_##type##_t* prot, type##_t value) \
{ \
......
......@@ -40,7 +40,7 @@
#include "gen_defs.h" /* HANDLE */
#include "wrapdll.h" /* DLLEXPORT and DLLCALL */
#ifdef __unix__
#ifdef __FreeBSD__
#include <stdatomic.h>
#endif
......@@ -152,7 +152,7 @@ DLLEXPORT int DLLCALL pthread_once(pthread_once_t *oc, void (*init)(void));
/* working and being thread-safe on all platforms that support pthread */
/* mutexes. */
/************************************************************************/
#ifdef __unix__
#ifdef __FreeBSD__
typedef _Atomic(int32_t) protected_int32_t;
typedef _Atomic(uint32_t) protected_uint32_t;
typedef _Atomic(int64_t) protected_int64_t;
......
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