$NetBSD: patch-ap,v 1.2 2005/10/07 16:10:44 drochner Exp $

--- modules/file-method.c.orig	2005-07-15 15:46:53.000000000 +0200
+++ modules/file-method.c
@@ -66,6 +66,7 @@
 #if HAVE_SYS_VFS_H
 #include <sys/vfs.h>
 #elif HAVE_SYS_MOUNT_H
+#include <sys/param.h>
 #include <sys/mount.h>
 #endif
 
@@ -173,13 +174,13 @@ GET_PATH_MAX (void)
 }
 #endif
 
-#ifdef HAVE_OPEN64
+#if defined(HAVE_OPEN64) && !defined(__APPLE__)
 #define OPEN open64
 #else
 #define OPEN g_open
 #endif
 
-#if defined(HAVE_LSEEK64) && defined(HAVE_OFF64_T)
+#if (defined(HAVE_LSEEK64) && defined(HAVE_OFF64_T)) && !defined(__APPLE__)
 #define LSEEK lseek64
 #define OFF_T off64_t
 #else
