[Swan-dev] different odd error on RHEL 6 [was Re: odd error only on ppc64 on rhel6]

D. Hugh Redelmeier hugh at mimosa.com
Tue Jun 18 15:38:28 UTC 2019


Lets please keep this separate so it doesn't get lost.

| From: Antony Antony <antony at phenome.org>
...

| However, CentOS is broken [1]

| [1]
| https://travis-ci.org/antonyantony/libreswan/builds/546142308
| /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",
| 


| From: D. Hugh Redelmeier <hugh at mimosa.com>
...
| | [1]
| | https://travis-ci.org/antonyantony/libreswan/builds/546142308
| | /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",
| 
| Interesting.
| 
| 1) this probably deserves its own thread.  It may not be noticed at the 
|    bottom of an unrelated message.
| 
| 2) I just did
| 	git pull
| 	make clean
| 	make base
|    and did not observe this.  Perhaps it is fixed?
| _______________________________________________


| From: Antony Antony <antony at phenome.org>

| On Mon, Jun 17, 2019 at 02:08:40AM -0400, D. Hugh Redelmeier wrote:
| > | [1]
| > | https://travis-ci.org/antonyantony/libreswan/builds/546142308
| > | /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",
| > 
| > Interesting.
| > 
| > 1) this probably deserves its own thread.  It may not be noticed at the 
| >    bottom of an unrelated message.
| > 
| > 2) I just did
| > 	git pull
| > 	make clean
| > 	make base
| >    and did not observe this.  Perhaps it is fixed?
| 
| not likely. Did you test on CentOS 6? The error only show up on CentOS. As I 
| recollect it started showing up recently, 2019, and on IRC the comment was 
| too old compiler, ignore it. Then I thought something for Hugh to ponder!

0) I don't have a system to test this on.  To test easily, it is nice
   to actually log in and muck about.  (Besidess, I'd like someone
   else to do the hard work :-)

1) my starting hypothesis would be that this was broken by
	0845df34e62fe99ddaa185231b6db7bc309abb0f

2) When I wrote the code long ago, I had a coherent philosophy of
   includes.  This has since changed and I no longer know our
   philosophy of includes.  This is unfortunate.

  Andrew: what is the philosophy that you are implementing?
  It needs to be documented as a project standard.

3) I don't know the correct fix.  But this should work.  Someone please 
   test this.

================
diff --git a/lib/libswan/addr_lookup.c b/lib/libswan/addr_lookup.c
index ff91fc857c..2e57ee8248 100644
--- a/lib/libswan/addr_lookup.c
+++ b/lib/libswan/addr_lookup.c
@@ -16,6 +16,7 @@
  * for more details.
  */
 
+#include <stdio.h>
 #include <error.h>
 #include <sys/types.h>
 #include <sys/socket.h>
================

4) I have not investigated why this isn't needed for most
   environments.


More information about the Swan-dev mailing list