Workaround faulty stdatomic.h header detection on Oracle Linux 7

Oracle Linux 7 sets __STDC_VERSION__ to 201112L, but doesn't define
__STDC_NO_ATOMICS__, so we try to include <stdatomic.h> without the
header present in the system.  Since we are already detecting the header
in the autoconf, use the HAVE_STDATOMIC_H for more reliable detecting
whether <stdatomic.h> header is present.
This commit is contained in:
Ondřej Surý 2023-08-22 14:23:05 +02:00
parent 9424f5a5b1
commit 701eb26f97
No known key found for this signature in database
GPG key ID: 2820F37E873DEA41

View file

@ -13,7 +13,7 @@
#pragma once
#if __STDC_VERSION__ >= 201112L && !defined(__STDC_NO_ATOMICS__)
#if HAVE_STDATOMIC_H
#include <stdatomic.h>
#else
#include <isc/stdatomic.h>