mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-03 00:00:24 -04:00
configure: Fix in6_pktinfo auto detection
This commit fixes auto detection of in6_pktinfo. When negotiating an IPv6 IKE session charon reported an error "Jun 30 16:42:49 03[NET] error reading IP header" The cause of error was missing in6_pktinfo declaration, which is auto detected. This auto detection may fail with an error depending on compiler flags: configure:19850: checking for in6_pktinfo configure:19870: gcc -c -g -O0 -Wall -Wno-format -Wno-format-security -Wno-pointer-sign -Werror -Wfatal-errors -Wno-error=stringop-truncation conftest.c >&5 conftest.c: In function 'main': conftest.c:73:11: error: 'pi.ipi6_ifindex' is used uninitialized in this function [-Werror=uninitialized] 73 | if (pi.ipi6_ifindex) | ~~^~~~~~~~~~~~~ compilation terminated due to -Wfatal-errors. cc1: all warnings being treated as errors Signed-off-by: Antony Antony <antony.antony@secunet.com>
This commit is contained in:
parent
0bff5c98bc
commit
cdc34ddea2
@ -744,7 +744,7 @@ AC_COMPILE_IFELSE(
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>]],
|
||||
[[struct in6_pktinfo pi;
|
||||
[[struct in6_pktinfo pi = {};
|
||||
if (pi.ipi6_ifindex)
|
||||
{
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user