pkgsrc/x11/xforms/patches/patch-ah
joerg 5bad78c8ce If defined, use _DIRENT_DIRSIZ on DragonFly to compute the size of
a dirent. Ignore the bogus size check done before.
2005-11-07 14:41:20 +00:00

15 lines
679 B
Text

$NetBSD: patch-ah,v 1.1 2005/11/07 14:41:20 joerg Exp $
--- lib/listdir.c.orig 2005-11-07 14:16:31.000000000 +0000
+++ lib/listdir.c
@@ -838,7 +838,9 @@ tc_scandir(const char *dirname, struct D
d_reclen = strlen(d_name) */
/* Mathog, VMS<7.0, at least has no d_reclen *at all */
-#if defined(__VMS) && __VMS_VER < 70000000 || defined opennt || defined __CYGWIN__
+#if defined(__DragonFly__) && defined(_DIRENT_DIRSIZ)
+ total = _DIRENT_DIRSIZ(dentry);
+#elif defined(__VMS) && __VMS_VER < 70000000 || defined opennt || defined __CYGWIN__
total = dname_is_1 ? strlen(dentry->d_name) : sizeof(*dentry);
#else
total = dname_is_1 ? dentry->d_reclen : sizeof(*dentry);