commit f2522b43139cc1a41a4a75d9eff84ee40be408da from: Omar Polo date: Wed Mar 31 16:52:07 2021 UTC check if sys/queue.h provides TAILQ_FOREACH_SAFE commit - b8e64ccd44290cdd34bdcd3fd85fb1a9cb7486dd commit + f2522b43139cc1a41a4a75d9eff84ee40be408da blob - d503040465e34194f447b33990e3dfbed1b3725f blob + 81d3c6166446ea4d4da6944141bfff27fe02d9a5 --- have/queue_h.c +++ have/queue_h.c @@ -18,12 +18,18 @@ #include -struct ibuf { - TAILQ_ENTRY(ibuf) entry; -}; +TAILQ_HEAD(tailhead, entry) head; +struct entry { + TAILQ_ENTRY(entry) entries; +} *np, *nt; int main(void) { + TAILQ_INIT(&head); + TAILQ_FOREACH_SAFE(np, &head, entries, nt) { + /* nop */; + } + return 0; }