$NetBSD: patch-aj,v 1.1 2006/01/09 22:45:08 joerg Exp $

--- src/ls.c.orig	2006-01-03 17:15:34.000000000 +0000
+++ src/ls.c
@@ -2528,7 +2528,7 @@ gobble_file (const char *name, enum file
   else
     {
       f->filetype = type;
-#if HAVE_STRUCT_DIRENT_D_TYPE
+#if HAVE_STRUCT_DIRENT_D_TYPE && defined(DTTOIF)
       f->stat.st_mode = DTTOIF (type);
 #endif
       blocks = 0;
