netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* conntrack-tools: 1 pending fix
@ 2012-05-31 12:03 Jan Engelhardt
  2012-05-31 12:03 ` [PATCH] conntrackd: resolve a compiler error Jan Engelhardt
  0 siblings, 1 reply; 6+ messages in thread
From: Jan Engelhardt @ 2012-05-31 12:03 UTC (permalink / raw)
  To: pablo; +Cc: netfilter-devel


The following changes since commit d44489648c1a56d543a84bbebe455227bb25cf34:

  conntrackd: fix compilation in src/parse.c (2012-05-28 14:06:48 +0200)

are available in the git repository at:
  git://git.inai.de/conntrack-tools fix

Jan Engelhardt (1):
      conntrackd: resolve a compiler error

 src/parse.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] conntrackd: resolve a compiler error
  2012-05-31 12:03 conntrack-tools: 1 pending fix Jan Engelhardt
@ 2012-05-31 12:03 ` Jan Engelhardt
  2012-05-31 13:19   ` Pablo Neira Ayuso
  0 siblings, 1 reply; 6+ messages in thread
From: Jan Engelhardt @ 2012-05-31 12:03 UTC (permalink / raw)
  To: pablo; +Cc: netfilter-devel

Observed with gcc-4.7/glibc-2.15 and conntrack-tools-1.2.1:

  CC     parse.o
parse.c: In function 'msg2ct':
parse.c:258:34: error: 'NULL' undeclared (first use in this function)
parse.c:258:34: note: each undeclared identifier is reported only once for each function it appears in
parse.c: In function 'msg2exp':
parse.c:438:16: error: 'NULL' undeclared (first use in this function)

NULL is in stdio.h.
---
 src/parse.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/parse.c b/src/parse.c
index 1b83f81..391bf38 100644
--- a/src/parse.c
+++ b/src/parse.c
@@ -17,6 +17,7 @@
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+#include <stdio.h>
 #include "network.h"
 
 #include <stdlib.h>
-- 
1.7.7


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] conntrackd: resolve a compiler error
  2012-05-31 12:03 ` [PATCH] conntrackd: resolve a compiler error Jan Engelhardt
@ 2012-05-31 13:19   ` Pablo Neira Ayuso
  2012-05-31 13:31     ` Florian Westphal
  0 siblings, 1 reply; 6+ messages in thread
From: Pablo Neira Ayuso @ 2012-05-31 13:19 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: netfilter-devel

Hi Jan,

On Thu, May 31, 2012 at 02:03:17PM +0200, Jan Engelhardt wrote:
> Observed with gcc-4.7/glibc-2.15 and conntrack-tools-1.2.1:
> 
>   CC     parse.o
> parse.c: In function 'msg2ct':
> parse.c:258:34: error: 'NULL' undeclared (first use in this function)
> parse.c:258:34: note: each undeclared identifier is reported only once for each function it appears in
> parse.c: In function 'msg2exp':
> parse.c:438:16: error: 'NULL' undeclared (first use in this function)

Similar patch was already applied.

http://git.netfilter.org/cgi-bin/gitweb.cgi?p=conntrack-tools.git;a=commit;h=d44489648c1a56d543a84bbebe455227bb25cf34

This was spotted a couple of days ago by Mandriva people.

Thanks anyway!

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] conntrackd: resolve a compiler error
  2012-05-31 13:19   ` Pablo Neira Ayuso
@ 2012-05-31 13:31     ` Florian Westphal
  2012-05-31 13:50       ` Jan Engelhardt
  0 siblings, 1 reply; 6+ messages in thread
From: Florian Westphal @ 2012-05-31 13:31 UTC (permalink / raw)
  To: Pablo Neira Ayuso; +Cc: Jan Engelhardt, netfilter-devel

Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> Hi Jan,
> 
> On Thu, May 31, 2012 at 02:03:17PM +0200, Jan Engelhardt wrote:
> > Observed with gcc-4.7/glibc-2.15 and conntrack-tools-1.2.1:
> > 
> >   CC     parse.o
> > parse.c: In function 'msg2ct':
> > parse.c:258:34: error: 'NULL' undeclared (first use in this function)
> > parse.c:258:34: note: each undeclared identifier is reported only once for each function it appears in
> > parse.c: In function 'msg2exp':
> > parse.c:438:16: error: 'NULL' undeclared (first use in this function)
> 
> Similar patch was already applied.
> 
> http://git.netfilter.org/cgi-bin/gitweb.cgi?p=conntrack-tools.git;a=commit;h=d44489648c1a56d543a84bbebe455227bb25cf34

NULL is defined in stddef.h, stdlib.h does not necessarily pull that
header in, too.

Jan, does conntrackd build when you replace the stdlib.h include with
stddef.h?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] conntrackd: resolve a compiler error
  2012-05-31 13:31     ` Florian Westphal
@ 2012-05-31 13:50       ` Jan Engelhardt
  2012-05-31 14:15         ` Pablo Neira Ayuso
  0 siblings, 1 reply; 6+ messages in thread
From: Jan Engelhardt @ 2012-05-31 13:50 UTC (permalink / raw)
  To: Florian Westphal; +Cc: Pablo Neira Ayuso, netfilter-devel


On Thursday 2012-05-31 15:31, Florian Westphal wrote:
>> > 
>> >   CC     parse.o
>> > parse.c: In function 'msg2ct':
>> > parse.c:258:34: error: 'NULL' undeclared (first use in this function)
>> > parse.c:258:34: note: each undeclared identifier is reported only once for each function it appears in
>> > parse.c: In function 'msg2exp':
>> > parse.c:438:16: error: 'NULL' undeclared (first use in this function)
>> 
>> Similar patch was already applied.
>> 
>> http://git.netfilter.org/cgi-bin/gitweb.cgi?p=conntrack-tools.git;a=commit;h=d44489648c1a56d543a84bbebe455227bb25cf34
>
>NULL is defined in stddef.h, stdlib.h does not necessarily pull that
>header in, too.

I believe that the C standard defines that NULL has to become available
through (at least) stdio.h. Though wikipedia may not always be authoritative,
I will use it as an excuse now: http://en.wikipedia.org/wiki/Stdio.h

So if #include <stddef.h> makes NULL available, good for glibc, but it
may not satisfy certain implementations.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] conntrackd: resolve a compiler error
  2012-05-31 13:50       ` Jan Engelhardt
@ 2012-05-31 14:15         ` Pablo Neira Ayuso
  0 siblings, 0 replies; 6+ messages in thread
From: Pablo Neira Ayuso @ 2012-05-31 14:15 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: Florian Westphal, netfilter-devel

On Thu, May 31, 2012 at 03:50:11PM +0200, Jan Engelhardt wrote:
> 
> On Thursday 2012-05-31 15:31, Florian Westphal wrote:
> >> > 
> >> >   CC     parse.o
> >> > parse.c: In function 'msg2ct':
> >> > parse.c:258:34: error: 'NULL' undeclared (first use in this function)
> >> > parse.c:258:34: note: each undeclared identifier is reported only once for each function it appears in
> >> > parse.c: In function 'msg2exp':
> >> > parse.c:438:16: error: 'NULL' undeclared (first use in this function)
> >> 
> >> Similar patch was already applied.
> >> 
> >> http://git.netfilter.org/cgi-bin/gitweb.cgi?p=conntrack-tools.git;a=commit;h=d44489648c1a56d543a84bbebe455227bb25cf34
> >
> >NULL is defined in stddef.h, stdlib.h does not necessarily pull that
> >header in, too.
> 
> I believe that the C standard defines that NULL has to become available
> through (at least) stdio.h. Though wikipedia may not always be authoritative,
> I will use it as an excuse now: http://en.wikipedia.org/wiki/Stdio.h
> 
> So if #include <stddef.h> makes NULL available, good for glibc, but it
> may not satisfy certain implementations.

As soon the compilation works, I'll be happy to use the more precise
header. Send me one patch upon the current git HEAD, I'll take it.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-05-31 14:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-31 12:03 conntrack-tools: 1 pending fix Jan Engelhardt
2012-05-31 12:03 ` [PATCH] conntrackd: resolve a compiler error Jan Engelhardt
2012-05-31 13:19   ` Pablo Neira Ayuso
2012-05-31 13:31     ` Florian Westphal
2012-05-31 13:50       ` Jan Engelhardt
2012-05-31 14:15         ` Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).