getmntinfo64.c.patch   [plain text]


--- getmntinfo.c.orig	2007-01-21 11:53:36.000000000 -0800
+++ getmntinfo.c	2007-01-21 17:05:23.000000000 -0800
@@ -46,25 +46,25 @@
  * Return information about mounted filesystems.
  */
 int
-getmntinfo(mntbufp, flags)
-	struct statfs **mntbufp;
+getmntinfo64(mntbufp, flags)
+	struct statfs64 **mntbufp;
 	int flags;
 {
-	static struct statfs *mntbuf;
+	static struct statfs64 *mntbuf;
 	static int mntsize;
 	static long bufsize;
 
-	if (mntsize <= 0 && (mntsize = getfsstat(0, 0, MNT_NOWAIT)) < 0)
+	if (mntsize <= 0 && (mntsize = getfsstat64(0, 0, MNT_NOWAIT)) < 0)
 		return (0);
-	if (bufsize > 0 && (mntsize = getfsstat(mntbuf, bufsize, flags)) < 0)
+	if (bufsize > 0 && (mntsize = getfsstat64(mntbuf, bufsize, flags)) < 0)
 		return (0);
-	while (bufsize <= mntsize * sizeof(struct statfs)) {
+	while (bufsize <= mntsize * sizeof(struct statfs64)) {
 		if (mntbuf)
 			free(mntbuf);
-		bufsize = (mntsize + 1) * sizeof(struct statfs);
-		if ((mntbuf = (struct statfs *)malloc(bufsize)) == 0)
+		bufsize = (mntsize + 1) * sizeof(struct statfs64);
+		if ((mntbuf = (struct statfs64 *)malloc(bufsize)) == 0)
 			return (0);
-		if ((mntsize = getfsstat(mntbuf, bufsize, flags)) < 0)
+		if ((mntsize = getfsstat64(mntbuf, bufsize, flags)) < 0)
 			return (0);
 	}
 	*mntbufp = mntbuf;