Summary: | sys-libs/glibc: gentoo patches use undefined __offsetof in sys/queue.h | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Markus Rathgeb <maggu2810> |
Component: | New packages | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | didier-bugzillagentoo, martin, tcunha |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | A simple testcase to point out the problem |
Description
Markus Rathgeb
2010-02-14 16:26:14 UTC
Created attachment 222019 [details]
A simple testcase to point out the problem
I suggest changing the summary of the bug report to "sys-libs/glibc: gentoo patches use undefined __offsetof in sys/queue.h". The attached testcase stailq.c is a condensed example of what's happening in this case. Portable code includes sys/queue.h and uses the definitions found there, if they're available, otherwise supplies its own definition of some macros. Normal glibc sys/queue.h doesn't contain a definition of STAILQ_LAST, but the gentoo patched version does. The version in gentoo sys/queue.h is copied verbatim from freebsd, and uses __offsetof, which is defined elsewhere on BSD systems, but not on gentoo. I suggest to simply change __offsetof into offsetof (which to my knowledge is a standard C feature since about C90) in this function macro. Confirmed on a stable x86 system with sys-libs/glibc-2.10.1-r1. changed to offsetof http://sources.gentoo.org/gentoo/src/patchsets/glibc/2.7/1010_all_glibc-queue-header-updates.patch?r1=1.1&r2=1.2 http://sources.gentoo.org/gentoo/src/patchsets/glibc/2.8/1010_all_glibc-queue-header-updates.patch?r1=1.1&r2=1.2 http://sources.gentoo.org/gentoo/src/patchsets/glibc/2.9/1010_all_glibc-queue-header-updates.patch?r1=1.1&r2=1.2 http://sources.gentoo.org/gentoo/src/patchsets/glibc/2.10.1/1010_all_glibc-queue-header-updates.patch?r1=1.1&r2=1.2 http://sources.gentoo.org/gentoo/src/patchsets/glibc/2.11/1010_all_glibc-queue-header-updates.patch?r1=1.1&r2=1.2 |