aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 82b9e7797814..65f3ab18357c 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) \