]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[build] Use __builtin_offsetof() when available
authorMichael Brown <mcb30@ipxe.org>
Sun, 28 Nov 2010 17:26:27 +0000 (17:26 +0000)
committerMichael Brown <mcb30@ipxe.org>
Sun, 28 Nov 2010 17:28:52 +0000 (17:28 +0000)
commit795793b3a4751936db4dc331aeb5f5549cfb3987
tree9577642ef8bcc565c3e0f66847007dfad31de68a
parentaa1c59ccfffb1bd0f859cb9b91a4026a7c648b0a
[build] Use __builtin_offsetof() when available

Some newer versions of gcc (observed with a patched gcc 4.5.1) seem to
treat our offsetof() implementation as not being a compile-time
constant.  Fix by using __builtin_offsetof() when available.  (As with
the original offsetof() macro, this code is copied from the Linux
kernel's stddef.h.)

Reported-by: Arkadiusz Miskiewicz <arekm@maven.pl>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/include/stddef.h