Bug#669960: buggy STAILQ_FOREACH_SAFE
Package: libc0.1-dev
Version: 2.11.3-2
Tags: patch
The STAILQ_FOREACH_SAFE implementation in <sys/queue.h> includes a broken
reference and causes build failure on programs that use it.
See attached patch.
-- System Information:
Debian Release: 6.0.4
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: kfreebsd-amd64 (x86_64)
Kernel: kFreeBSD 8.1-1-amd64
Locale: LANG=ca_AD.UTF-8, LC_CTYPE=ca_AD.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages libc0.1-dev depends on:
ii kfreebsd-kernel-headers 0.53 kernel of FreeBSD headers for deve
ii libc-dev-bin 2.11.3-2 Embedded GNU C Library: Developmen
ii libc0.1 2.11.3-2 Embedded GNU C Library: Shared lib
Versions of packages libc0.1-dev recommends:
ii bcc [c-compiler] 0.16.17-3.1 16-bit x86 C compiler
ii gcc [c-compiler] 4:4.4.5-1 The GNU C compiler
ii gcc-4.3 [c-compiler] 4.3.5-4 The GNU C compiler
ii gcc-4.4 [c-compiler] 4.4.5-8 The GNU C compiler
Versions of packages libc0.1-dev suggests:
pn glibc-doc <none> (no description available)
ii manpages-dev 3.27-1 Manual pages about using GNU/Linux
-- no debconf information
--- /usr/include/sys/queue.h~ 2012-04-21 19:43:25.000000000 +0200
+++ /usr/include/sys/queue.h 2012-04-22 11:51:10.113666960 +0200
@@ -294,7 +294,7 @@
(var) = ((var)->field.stqe_next))
#define STAILQ_FOREACH_SAFE(var, head, field, tvar) \
- for ((var) = ((elm)->field.stqe_next); \
+ for ((var) = ((head)->stqh_first); \
(var) && ((tvar) = ((var)->field.stqe_next), 1); \
(var) = (tvar))
Reply to: