pkgsrc/x11/xforms/patches/patch-ah
dholland 208c309673 Fix pkglint; fix whitespace in patches; add patch comments.
Improve patch-ag to never attempt to declare errno.
2012-07-30 02:53:57 +00:00

17 lines
754 B
Text

$NetBSD: patch-ah,v 1.2 2012/07/30 02:53:57 dholland Exp $
Dragonfly-specific dirent handling. (From 2005; is this still needed?)
--- 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);