[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2 4/4] tools: add offsetof() to xen-tools/common-macros.h
On 27.02.23 16:53, Jan Beulich wrote: On 27.02.2023 16:41, Juergen Gross wrote:--- a/tools/firmware/include/stddef.h +++ b/tools/firmware/include/stddef.h @@ -1,10 +1,10 @@ #ifndef _STDDEF_H_ #define _STDDEF_H_+#include <xen-tools/common-macros.h>+ typedef __SIZE_TYPE__ size_t;#define NULL ((void*)0) -#define offsetof(t, m) __builtin_offsetof(t, m)- #endifThe C standard is pretty specific about what a header of this name may or (in particular here) may not define. You add much more to the name space than just the replacement offsetof(). If this was a header used by an individual component, this might be fine. But this header is meant to serve all components under firmware/ which care to include it. At present that's hvmloader (which we control, so we can arrange for it to be free of collisions) and rombios (which we do not really control, and which people also may not build routinely anymore). Good point. I have verified that the build is still succeeding without the modification of tools/firmware/include/stddef.h, so I'll drop this hunk. Juergen Attachment:
OpenPGP_0xB0DE9DD628BF132F.asc Attachment:
OpenPGP_signature
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |