Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 May 2007 23:48:47 +0200
From:      Ed Schouten <ed@fxq.nl>
To:        Josep Pujadas i Jubany <josep@bellera.cat>
Cc:        FreeBSD Current <freebsd-current@freebsd.org>
Subject:   Re: LIST_END doesn't exist at queue.h
Message-ID:  <20070527214847.GX23313@hoeg.nl>
In-Reply-To: <20070527210345.M41000@bellera.cat>
References:  <20070527210345.M41000@bellera.cat>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
Hello, 

* Josep Pujadas i Jubany <josep@bellera.cat> wrote:
> Hello!
> 
> I can't compile snort2c (http://snort2c.sourceforge.net/) on FreeBSD 6.2 ...
> 
> # make 
> Warning: Object directory not changed from 
> original /usr/home/super/snort_pf/snort2c-0.2/snort2c 
> cc -O2 -fno-strict-aliasing -pipe  -Wall -Werror -g -O2  -c parser.c 
> parser.c: In function `s2c_parse_free_wl': 
> parser.c:283: warning: implicit declaration of function `LIST_END' 
> parser.c:283: warning: comparison between pointer and integer 
> *** Error code 1 
> 
> Stop in /usr/home/super/snort_pf/snort2c-0.2/snort2c. 
> 
> The package is designed for working with OpenBSD, where LIST_END exists 
> for queue.h
> 
> http://nixdoc.net/man-pages/OpenBSD/LIST_END.3.html
> 
> I looked at my /usr/include/sys/queue.h and at man queue and LIST_END is not 
> supported.
> 
> Any idea?

If I understand the manual page correctly, LIST_END(head) is nothing
more than some portable way to handle sentinels at the end of the list.
Just smack the following code above the C file:

| #ifndef LIST_END
| #define LIST_END(head) NULL
| #endif

This is exactly the same as how it is defined in OpenBSD's sys/queue.h:

	http://www.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/sys/queue.h?content-type=text/plain

-- 
 Ed Schouten <ed@fxq.nl>
 WWW: http://g-rave.nl/

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (FreeBSD)

iD8DBQFGWfy/52SDGA2eCwURAmJpAJ4piULrkWtDokqd1FEtVGYyon6VCQCeIT6Y
x62y9sx1F92Vt0+30E9GXaU=
=H+Ar
-----END PGP SIGNATURE-----
help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070527214847.GX23313>