]> git.ipfire.org Git - thirdparty/asterisk.git/commit
compat.h: Ensure check for `__STDC_VERSION__` is not attempted for c++.
authorGeorge Joseph <gjoseph@sangoma.com>
Mon, 27 Apr 2026 17:52:27 +0000 (11:52 -0600)
committergithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Tue, 28 Apr 2026 13:18:16 +0000 (13:18 +0000)
commit7a57d9f2ed4e61ec0cd7e5b71ed97ecebeeb743b
tree49505373179072e1eb2b9822fbf85db31400ef6d
parentd9b8066ec087535034afc0df7f0c1726c7f0c73d
compat.h: Ensure check for `__STDC_VERSION__` is not attempted for c++.

`__STDC_VERSION__` is specific to C but up until gcc 16, the g++ compiler
also defined it.  With g++ 16.0 it's no longer defined (which is the correct
behavior) so compiling channelstorage_cpp_map_name_id.cc fails.  The
check for `__STDC_VERSION__` in compat.h is now skipped if we're compiling
a C++ source file.

Resolves: #1903
include/asterisk/compat.h