Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 222019 Details for
Bug 305075
sys-libs/glibc: gentoo patches use undefined __offsetof in sys/queue.h
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
A simple testcase to point out the problem
stailq.c (text/plain), 653 bytes, created by
Martin Storsjö
on 2010-03-04 10:16:13 UTC
(
hide
)
Description:
A simple testcase to point out the problem
Filename:
MIME Type:
Creator:
Martin Storsjö
Created:
2010-03-04 10:16:13 UTC
Size:
653 bytes
patch
obsolete
>#include <stdio.h> >#include <stddef.h> >#include <sys/types.h> >#include <sys/queue.h> > >#ifndef STAILQ_LAST >#define STAILQ_LAST(head, type, field) \ > (STAILQ_EMPTY((head)) ? \ > NULL : \ > ((struct type *)(void *) \ > ((char *)((head)->stqh_last) - offsetof(struct type, field)))) >#endif > >struct foo { > int a, b; > STAILQ_ENTRY(foo) next; >}; > >int main(int argc, char* argv[]) { > STAILQ_HEAD(, foo) stailq; > STAILQ_LAST(&stailq, foo, next); > return 0; >} >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 305075
: 222019