diff options
author | Alex Richardson <arichardson@FreeBSD.org> | 2022-05-25 22:05:03 +0000 |
---|---|---|
committer | Simon McVittie <smcv@collabora.com> | 2022-05-26 11:26:38 +0000 |
commit | 56e52a4212cb78e55d1bdee9c1f2a85a205c1ee9 (patch) | |
tree | 6abf30f0173d1f1257970b16e7ff5822c23b3670 /configure.ac | |
parent | 7a1d24bac686a727567d80e17eff003cbaa1db0c (diff) | |
download | dbus-56e52a4212cb78e55d1bdee9c1f2a85a205c1ee9.tar.gz |
configure: Avoid exit() when checking for __sync_sub_and_fetch()
Use of exit() requires a stdlib.h include. This check was failing for me
since the compiler defaulted to -Werror=implicit-function-declaration, so
__sync_sub_and_fetch() support was not dectected.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 60a4cbe1..3b225a29 100644 --- a/configure.ac +++ b/configure.ac @@ -625,7 +625,7 @@ AS_IF([test -n "$dbus_va_copy_func"], AC_CACHE_CHECK([whether $CC knows __sync_sub_and_fetch()], dbus_cv_sync_sub_and_fetch, [AC_LINK_IFELSE([ - AC_LANG_PROGRAM([[]], [[int a = 4; int b = __sync_sub_and_fetch(&a, 4); exit(b); ]])], + AC_LANG_PROGRAM([[]], [[int a = 4; int b = __sync_sub_and_fetch(&a, 4); return b; ]])], [dbus_cv_sync_sub_and_fetch=yes], [dbus_cv_sync_sub_and_fetch=no]) ]) |