36 lines
960 B
Text
36 lines
960 B
Text
$NetBSD: patch-ae,v 1.12 2017/06/22 20:48:04 tnn Exp $
|
|
|
|
--- dialects/n+obsd/dmnt.c.orig 2005-08-08 19:53:31.000000000 +0000
|
|
+++ dialects/n+obsd/dmnt.c
|
|
@@ -45,6 +45,18 @@ static char *rcsid = "$Id: dmnt.c,v 1.12
|
|
#include <sys/statvfs.h>
|
|
#endif /* defined(NETBSDV) && defined(HASSTATVFS) */
|
|
|
|
+#if defined(NETBSDV)
|
|
+#include <sys/param.h>
|
|
+
|
|
+#if __NetBSD_Version__ >= 899000100
|
|
+#define __EXPOSE_MOUNT
|
|
+#endif
|
|
+#if __NetBSD_Version__ >= 399002400
|
|
+#include <sys/types.h>
|
|
+#include <sys/mount.h>
|
|
+#endif
|
|
+#endif
|
|
+
|
|
#include "lsof.h"
|
|
|
|
|
|
@@ -94,7 +106,12 @@ readmnt()
|
|
for (; n; n--, mb++) {
|
|
if (mb->f_fstypename[0] == '\0')
|
|
continue;
|
|
+#if defined(NETBSDV) && __NetBSD_Version__ >= 499002500
|
|
+ /* MFSNAMELEN was removed from the kernel source after 4.99.24 */
|
|
+ mb->f_fstypename[sizeof(mb->f_fstypename) - 1] = '\0';
|
|
+#else
|
|
mb->f_fstypename[MFSNAMELEN - 1] = '\0';
|
|
+#endif
|
|
/*
|
|
* Interpolate a possible symbolic directory link.
|
|
*/
|