Use offsetof() from sys/types.h instead of a custom one

This fixes build with recent gcc versions
This commit is contained in:
Baptiste Daroussin 2014-10-09 15:26:22 +00:00
parent 2e7634503e
commit 92a1d420ba
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=272825

View File

@ -110,7 +110,7 @@ struct direct {
*
*/
#define DIRECTSIZ(namlen) \
(((uintptr_t)&((struct direct *)0)->d_name + \
((offsetof(struct direct, d_name) + \
((namlen)+1)*sizeof(((struct direct *)0)->d_name[0]) + 3) & ~3)
#if (BYTE_ORDER == LITTLE_ENDIAN)
#define DIRSIZ(oldfmt, dp) \