Skip to content

Add CIRCLEQ compatibility macros - #6

Open
arieleren wants to merge 1 commit into
freebsd:mainfrom
arieleren:add-circleq-compat
Open

Add CIRCLEQ compatibility macros#6
arieleren wants to merge 1 commit into
freebsd:mainfrom
arieleren:add-circleq-compat

Conversation

@arieleren

Copy link
Copy Markdown

FreeBSD removed CIRCLEQ_* from <sys/queue.h>. glibc still provides them, so Linux-oriented code that includes <sys/queue.h> fails to build on FreeBSD.
Add linuxapi/sys/queue.h in the same style as the other shims: include_next the system header, then define the historic 4.4BSD CIRCLEQ macros when they are absent. Cover CIRCLEQ_HEAD, CIRCLEQ_ENTRY, insert/remove, foreach, and the loop accessors.
Extend tests/smoketest.c so the header is compiled.
Fixes #5

FreeBSD removed CIRCLEQ from sys/queue.h, but Linux libc still exposes it.
Provide the historic queue macros for ports that expect the Linux API.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Restore CIRCLEQ macros removed from FreeBSD <sys/queue.h>

2 participants