summaryrefslogtreecommitdiffstats
path: root/sys/ufs
diff options
context:
space:
mode:
Diffstat (limited to 'sys/ufs')
-rw-r--r--sys/ufs/ufs/dir.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/ufs/ufs/dir.h b/sys/ufs/ufs/dir.h
index 82b9e77..65f3ab1 100644
--- a/sys/ufs/ufs/dir.h
+++ b/sys/ufs/ufs/dir.h
@@ -110,7 +110,7 @@ struct direct {
*
*/
#define DIRECTSIZ(namlen) \
- ((offsetof(struct direct, d_name) + \
+ (((uintptr_t)&((struct direct *)0)->d_name + \
((namlen)+1)*sizeof(((struct direct *)0)->d_name[0]) + 3) & ~3)
#if (BYTE_ORDER == LITTLE_ENDIAN)
#define DIRSIZ(oldfmt, dp) \
OpenPOWER on IntegriCloud