[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] branch master updated: build: Fix regression wrt atomics detect
From: |
gnunet |
Subject: |
[gnunet] branch master updated: build: Fix regression wrt atomics detection and other portability fixes. |
Date: |
Sun, 05 Jan 2025 22:23:55 +0100 |
This is an automated email from the git hooks/post-receive script.
martin-schanzenbach pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new 27f719bf6 build: Fix regression wrt atomics detection and other
portability fixes.
27f719bf6 is described below
commit 27f719bf65ab10192330c5a8ebdc042321794e2f
Author: Martin Schanzenbach <schanzen@gnunet.org>
AuthorDate: Sun Jan 5 22:23:15 2025 +0100
build: Fix regression wrt atomics detection and other portability fixes.
---
configure.ac | 3 +++
meson.build | 6 ++----
src/lib/json/json_helper.c | 2 +-
src/lib/util/Makefile.am | 7 -------
src/lib/util/meson.build | 3 ++-
5 files changed, 8 insertions(+), 13 deletions(-)
diff --git a/configure.ac b/configure.ac
index 4f29795bb..5d84da114 100644
--- a/configure.ac
+++ b/configure.ac
@@ -756,6 +756,9 @@ AS_IF([test "x$nss" = "xfalse"],
AC_MSG_WARN([NSS plugin will not be built])],
[[#include <nss.h>]])])
+# libatomic
+AC_SEARCH_LIBS([__atomic_load_8], [atomic])
+
# test for kvm and kstat (for CPU stats under BSD/Solaris)
AC_CHECK_LIB([kvm], [kvm_open])
AC_CHECK_LIB([kstat], [kstat_open])
diff --git a/meson.build b/meson.build
index d9b496d82..6088d052d 100644
--- a/meson.build
+++ b/meson.build
@@ -405,10 +405,8 @@ if not tun_found and cc.check_header('net/tun/if_tun.h')
endif
endif
-# NSS
-if cc.check_header('nss.h')
- add_project_arguments('-DHAVE_GLIBCNSS', language : 'c')
-endif
+# Check for optional libatomic
+atomic_dep = cc.find_library('atomic', required : false)
# GNUTLS DANE
if cc.check_header('gnutls/dane.h')
diff --git a/src/lib/json/json_helper.c b/src/lib/json/json_helper.c
index 8cd83d67d..ad6ff32ac 100644
--- a/src/lib/json/json_helper.c
+++ b/src/lib/json/json_helper.c
@@ -865,7 +865,7 @@ parse_ull (void *cls,
return GNUNET_SYSERR;
}
val = json_integer_value (root);
- if ((0 > val) || (val > ULONG_LONG_MAX))
+ if ((0 > val) || (val > ULLONG_MAX))
{
GNUNET_break_op (0);
return GNUNET_SYSERR;
diff --git a/src/lib/util/Makefile.am b/src/lib/util/Makefile.am
index 636d5fb73..54f8a4e2e 100644
--- a/src/lib/util/Makefile.am
+++ b/src/lib/util/Makefile.am
@@ -111,12 +111,6 @@ libgnunetutil_la_SOURCES = \
proc_compat.c \
gnunet_error_codes.c
-if DARWIN
- LIBATOMIC=
-else
- LIBATOMIC= -latomic
-endif
-
if HAVE_LIBIDN
LIBIDN= -lidn
else
@@ -134,7 +128,6 @@ libgnunetutil_la_CFLAGS = \
${MHD_CFLAGS}
libgnunetutil_la_LIBADD = \
$(GCLIBADD) $(WINLIB) \
- $(LIBATOMIC) \
$(LIBGCRYPT_LIBS) \
$(LTLIBICONV) \
$(LTLIBINTL) \
diff --git a/src/lib/util/meson.build b/src/lib/util/meson.build
index 97833211b..1a9506986 100644
--- a/src/lib/util/meson.build
+++ b/src/lib/util/meson.build
@@ -93,7 +93,8 @@ libgnunetutil = library('gnunetutil',
sqlite_dep,
unistr_dep,
ltdl_dep,
- idn_dep
+ idn_dep,
+ atomic_dep
],
include_directories: [incdir, configuration_inc],
install: true,
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnunet] branch master updated: build: Fix regression wrt atomics detection and other portability fixes.,
gnunet <=