summaryrefslogtreecommitdiff
path: root/ufs/dir.h
diff options
context:
space:
mode:
Diffstat (limited to 'ufs/dir.h')
-rw-r--r--ufs/dir.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/ufs/dir.h b/ufs/dir.h
index 193e167b..1c35768a 100644
--- a/ufs/dir.h
+++ b/ufs/dir.h
@@ -90,8 +90,9 @@ struct directory_entry {
/* Return the namlen from a struct direct, paying attention to whether
this filesystem supports the type extension */
#if (BYTE_ORDER == LITTLE_ENDIAN)
-#define DIRECT_NAMLEN(dp) (direct_symlink_extension ? (dp)->d_namlen : \
- (dp)->d_type)
+#define DIRECT_NAMLEN(dp) (direct_symlink_extension || swab_disk \
+ ? (dp)->d_namlen \
+ : (dp)->(dp)->d_type)
#else
#define DIRECT_NAMLEN(dp) ((dp)->d_namlen)
#endif