Project

General

Profile

Actions

Bug #8007

closed

want sys/stddef.h for offsetof and container_of macros

Added by Toomas Soome over 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
kernel
Start date:
2017-03-28
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

The current uts/common/sys/sysmacros.h does attempt to protect offsetof() and container_of() macros from getting exposed to userland stddef.h by using construct:

#if (defined(_KERNEL) || defined(_FAKE_KERNEL)) && !defined(_KMEMUSER)
..
#endif

However, the i86pc and i86xpv dboot is built with -D_BOOT -D_KMEMUSER -U_KERNEL and is therefore excluded from offsetof() and container_of() macros. To solve this issue, we need to update the conditional expression.

Actions

Also available in: Atom PDF