FreeBSD removed the CIRCLEQ_* family from <sys/queue.h>. glibc still provides those macros, so Linux-oriented code that includes <sys/queue.h>
and uses CIRCLEQ_HEAD / CIRCLEQ_ENTRY / CIRCLEQ_INSERT_* fails to build on FreeBSD.
linuxapi already fills similar glibc/Linux gaps (for example MAP_HUGETLB in sys/mman.h). CIRCLEQ is the same kind of missing API: a historic 4.4BSD queue implementation that Linux libc kept and FreeBSD dropped.
Proposed approach:
- add linuxapi/sys/queue.h
- #include_next <sys/queue.h>
- define the classic CIRCLEQ macros under #ifndef CIRCLEQ_HEAD
- extend tests/smoketest.c so the header is compiled
I have a patch ready if this looks acceptable.
FreeBSD removed the CIRCLEQ_* family from <sys/queue.h>. glibc still provides those macros, so Linux-oriented code that includes <sys/queue.h>
and uses CIRCLEQ_HEAD / CIRCLEQ_ENTRY / CIRCLEQ_INSERT_* fails to build on FreeBSD.
linuxapi already fills similar glibc/Linux gaps (for example MAP_HUGETLB in sys/mman.h). CIRCLEQ is the same kind of missing API: a historic 4.4BSD queue implementation that Linux libc kept and FreeBSD dropped.
Proposed approach:
I have a patch ready if this looks acceptable.