summaryrefslogtreecommitdiff
path: root/src/common/compat_threads.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-08-08 15:41:40 -0400
committerNick Mathewson <nickm@torproject.org>2018-08-08 15:49:39 -0400
commitb66386865e68d8df0f228187781fcd5bc2dbf184 (patch)
treeff8a46127ecef42de61e631cbfa090a66547d0e6 /src/common/compat_threads.c
parent00536254b765900127af04f278ed591d562434d9 (diff)
downloadtor-b66386865e68d8df0f228187781fcd5bc2dbf184.tar.gz
tor-b66386865e68d8df0f228187781fcd5bc2dbf184.zip
Detect broken stdatomic.h, and pretend that it isn't there at all
I hope that the debian clang maintainers will look at debian bug 903709 soon. But until they do, this should keep our users and our CI happy on sid with clang. Closes ticket 26779.
Diffstat (limited to 'src/common/compat_threads.c')
-rw-r--r--src/common/compat_threads.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/common/compat_threads.c b/src/common/compat_threads.c
index 3171c4b2f2..9f64c06342 100644
--- a/src/common/compat_threads.c
+++ b/src/common/compat_threads.c
@@ -352,7 +352,7 @@ alert_sockets_close(alert_sockets_t *socks)
socks->read_fd = socks->write_fd = -1;
}
-#ifndef HAVE_STDATOMIC_H
+#ifndef HAVE_WORKING_STDATOMIC
/** Initialize a new atomic counter with the value 0 */
void
atomic_counter_init(atomic_counter_t *counter)
@@ -403,5 +403,4 @@ atomic_counter_exchange(atomic_counter_t *counter, size_t newval)
tor_mutex_release(&counter->mutex);
return oldval;
}
-#endif /* !defined(HAVE_STDATOMIC_H) */
-
+#endif /* !defined(HAVE_WORKING_STDATOMIC) */