Skip to content

Commit 764bfdc

Browse files
committed
check whether exists __sync_{sub, add}_and_fetch
1 parent f290814 commit 764bfdc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

configure.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ AC_CACHE_CHECK([for __sync_* atomic operations], msgpack_cv_atomic_ops, [
4747
AC_TRY_LINK([
4848
int atomic_sub(int i) { return __sync_sub_and_fetch(&i, 1); }
4949
int atomic_add(int i) { return __sync_add_and_fetch(&i, 1); }
50-
], [], msgpack_cv_atomic_ops="yes")
50+
], [atomic_sub(1); atomic_add(1);], msgpack_cv_atomic_ops="yes")
5151
])
5252
if test "$msgpack_cv_atomic_ops" != "yes"; then
5353
if test "$enable_cxx" = "no"; then

0 commit comments

Comments
 (0)