Whamcloud - gitweb
libext2fs: use compiler built-in offsetof() if available
authorTheodore Ts'o <tytso@mit.edu>
Sat, 23 Jan 2021 05:55:25 +0000 (00:55 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 23 Jan 2021 05:55:25 +0000 (00:55 -0500)
commitb1b864b398b2b7bc2ca54aca91b7abb1acee321d
tree153393a2e02350fefb295374b025e4aa7d78241d
parentc3c41d4ffbdbbce2e7199ece8f76cea0310de820
libext2fs: use compiler built-in offsetof() if available

This avoids UBSAN sanitizer warnings, since &(0->member) is
technically undefined per the C standard.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/ext2fs/compiler.h [new file with mode: 0644]
lib/ext2fs/kernel-list.h
lib/ext2fs/rbtree.h