mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
Fix 24172: __STDC_VERSION__ may be defined in C++
According to the C++ ISO standard, a conformant compiler is allowed to define this macro to any value for any reason as it is implementation defined: https://timsong-cpp.github.io/cppwp/cpp.predefined#2.3 This mean that it cannot be assumed that it is not defined in a C++. Change the condition to reflect that.
This commit is contained in:
committed by
Lennart Poettering
parent
2d2efed2ee
commit
00852912ed
@@ -85,7 +85,7 @@ typedef void (*_sd_destroy_t)(void *userdata);
|
||||
#endif
|
||||
|
||||
#ifndef _SD_ARRAY_STATIC
|
||||
# if __STDC_VERSION__ >= 199901L
|
||||
# if __STDC_VERSION__ >= 199901L && !defined(__cplusplus)
|
||||
# define _SD_ARRAY_STATIC static
|
||||
# else
|
||||
# define _SD_ARRAY_STATIC
|
||||
|
||||
Reference in New Issue
Block a user