xelerance / Openswan

Openswan
Other
849 stars 214 forks source link

fix build with gcc 10 #444

Closed ffontaine closed 3 years ago

ffontaine commented 3 years ago

Define kw_host_list and kw_connaddrfamily_list as extern to avoid the following build failure with gcc 10 (which defaults to -fno-common):

/home/peko/autobuild/instance-1/output-1/host/lib/gcc/arm-buildroot-linux-gnueabihf/10.2.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: initiate.o:/home/peko/autobuild/instance-1/output-1/build/openswan-2.6.51.5/include/pluto_constants.h:650: multiple definition of `kw_host_list'; connections.o:/home/peko/autobuild/instance-1/output-1/build/openswan-2.6.51.5/include/pluto_constants.h:650: first defined here

Fixes:

Signed-off-by: Fabrice Fontaine fontaine.fabrice@gmail.com

shussain commented 3 years ago

Thank you @ffontaine

I have cherry-picked the change into the 2.6.52dev branch which we will merge into master in a month or two