diff options
author | bapt <bapt@FreeBSD.org> | 2014-10-09 15:26:22 +0000 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2014-10-09 15:26:22 +0000 |
commit | c47600c4ec062b8225ac1d48197a2a1de778760d (patch) | |
tree | 6d96918a1c17c7bb035c8b0921e1103334d5a97e /sys/ufs | |
parent | 005c9e3ebec21483d0f5502ffc3df9146e415bd3 (diff) | |
download | FreeBSD-src-c47600c4ec062b8225ac1d48197a2a1de778760d.zip FreeBSD-src-c47600c4ec062b8225ac1d48197a2a1de778760d.tar.gz |
Use offsetof() from sys/types.h instead of a custom one
This fixes build with recent gcc versions
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ufs/dir.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/ufs/ufs/dir.h b/sys/ufs/ufs/dir.h index 65f3ab1..82b9e77 100644 --- a/sys/ufs/ufs/dir.h +++ b/sys/ufs/ufs/dir.h @@ -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) \ |