Gitiles
Code Review
Sign In
gerrit.openbmc.org
/
openbmc
/
libpldm
/
5f288563297fc4cd38d7ecfeeba1d3ba60a4d31e
/
.
/
src
/
transport
/
container-of.h
blob: d8e6759369019db81e54af2f3b6739d5657222ec [
file
] [
log
] [
blame
]
/* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later */
#ifndef
CONTAINER_OF_H
#define
CONTAINER_OF_H
#ifndef
container_of
#define
container_of
(
ptr
,
type
,
member
)
\
(
type
*)((
char
*)(
ptr
)
-
offsetof
(
type
,
member
))
#endif
#endif