xelerance / Openswan

Openswan
Other
858 stars 212 forks source link

fix build with gcc 10 #444

Closed ffontaine closed 4 years ago

ffontaine commented 4 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 4 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