Re: [PATCH 2/2] libext2fs: use offsetof() from stddef.h
From: "Theodore Ts'o" <tytso@mit.edu>
Date: 2021-07-06 02:55:34
From: "Theodore Ts'o" <tytso@mit.edu>
Date: 2021-07-06 02:55:34
On Wed, Apr 14, 2021 at 12:41:28AM -0700, Michael Forney wrote:
offsetof is a standard C feature available from stddef.h, going back all the way to ANSI C. Signed-off-by: Michael Forney <redacted>
Thanks, applied.
Perhaps there is some reason to prefer compiler builtins over libc that I'm not seeing?
It's because I pulled container_of from the kernel, and the kernel header files has to provide offsetof since we don't use the standard header files --- and it has to work across a bunch of compilers and architectures. - Ted