Skip to content

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

Description

@arieleren

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions