$NetBSD: patch-am,v 1.1 2008/01/12 23:30:38 bad Exp $

--- platforms/unix/src/plugins/UnixOSProcessPlugin/UnixOSProcessPlugin.c.orig	2007-12-06 19:11:42.000000000 -0600
+++ platforms/unix/src/plugins/UnixOSProcessPlugin/UnixOSProcessPlugin.c
@@ -1870,7 +1870,7 @@ EXPORT(sqInt) primitiveLockFileRegion(vo
 
 	/* Set up the flock structure parameter for fcntl() */
 
-	fileNo = fileno(sqFile->file);
+	fileNo = fileno((FILE *)sqFile->file);
 	if (exclusive) {
 		lockStruct.l_type = F_WRLCK;
 	} else {
@@ -2897,7 +2897,7 @@ EXPORT(sqInt) primitiveTestLockableFileR
 
 	/* Set up the flock structure parameter for fcntl() */
 
-	fileNo = fileno(sqFile->file);
+	fileNo = fileno((FILE *)sqFile->file);
 	if (exclusive) {
 		lockStruct.l_type = F_WRLCK;
 	} else {
@@ -2957,7 +2957,7 @@ EXPORT(sqInt) primitiveUnixFileNumber(vo
 		return interpreterProxy->primitiveFail();
 	}
 	sqFile = interpreterProxy->arrayValueOf(sqFileOop);
-	fileNo = fileno(sqFile->file);
+	fileNo = fileno((FILE *)sqFile->file);
 	interpreterProxy->pop(2);
 	interpreterProxy->pushInteger(fileNo);
 }
@@ -3001,7 +3001,7 @@ EXPORT(sqInt) primitiveUnlockFileRegion(
 
 	/* Set up the flock structure parameter for fcntl() */
 
-	fileNo = fileno(sqFile->file);
+	fileNo = fileno((FILE *)sqFile->file);
 	lockStruct.l_type = F_UNLCK;
 	lockStruct.l_whence = SEEK_SET;
 	lockStruct.l_start = start;
