]> git.ipfire.org Git - thirdparty/strongswan.git/commit
object: Fix CALLBACK macros with GCC 12
authorTobias Brunner <tobias@strongswan.org>
Thu, 19 May 2022 09:10:07 +0000 (11:10 +0200)
committerTobias Brunner <tobias@strongswan.org>
Mon, 27 Jun 2022 12:03:32 +0000 (14:03 +0200)
commit993ea3282571b993ec2c631def5b6f3303b6d2f5
treea2e0a87b754d45837299ab793fc7441161b123cf
parentcc1d78b0a879a3a4c494427073742a1d1e6bf14e
object: Fix CALLBACK macros with GCC 12

GCC 12 produces weird code when a callback is called directly (e.g.
parse_bool() via parse_option() in vici_config.c).  Instead of the actual
pointer, it explicitly passes 0 as first argument, which likely causes
a segmentation fault.  It doesn't happen when called indirectly via
function pointer that has void* as first argument, which this patch
kinda replicates for direct calls to avoid the issue.

Closes strongswan/strongswan#1053
src/libstrongswan/utils/utils/object.h