[Swan-dev] CentOS 6 "implicit declaration of function ‘printf’"

Antony Antony antony at phenome.org
Tue Jun 18 14:56:58 UTC 2019


A while ago, while many of you  were busy pushing 3.28 release an annoying 
warning/error crept in, travis test reported it only on CentOS 6. As I 
recollect, it was discarded as not important on IRC. I thought I will drop 
an e-mail about it. 

The proposed fix is disable all warnings, WERROR_CFLAGS= for CentOS or older 
compilers. I wonder if there is a better fix for it. And also curious what 
triggered this, the commit is shuffling include files around. I could not 
figure which line is causing warning.

after commit 0845df34 on CentOS6 travis compile reported the following 
error.

/home/build/libreswan/lib/libswan/addr_lookup.c: In function ‘resolve_point_to_point_peer’:
/home/build/libreswan/lib/libswan/addr_lookup.c:67:6: error: implicit declaration of function ‘printf’ [-Werror=implicit-function-declaration]
      printf("found peer %s to interface %s\n", 

/home/build/libreswan/lib/libswan/addr_lookup.c:67:6: error: incompatible implicit declaration of built-in function ‘printf’ [-Werror]
      printf("found peer %s to interface %s\n", 



due this error recomended line WERROR_CFLAGS= USE_DNSSEC=false 
USE_NSS_IPSEC_PROFILE=false  make programs

before this commit

WERROR_CFLAGS='-Werror -Wno-missing-field-initializers'  USE_DNSSEC=false 
USE_NSS_IPSEC_PROFILE=false  make programs



More information about the Swan-dev mailing list