Subject: Re: lockf
To: None <netbsd-users@NetBSD.org>
From: Stefan Sonnenberg-Carstens <ssc@coolspot.de>
List: netbsd-users
Date: 04/08/2004 13:55:20
I got the source from FreeBSD-CURRENT.
It uses some specific macros, like __unused, which made it
uncompilable.
Here's my diff -uN

diff -uN lockf.c.orig lockf.c
--- lockf.c.orig        Thu Apr  8 13:54:22 2004
+++ lockf.c     Wed Apr  7 11:40:07 2004
@@ -24,7 +24,6 @@
  */

 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: /repoman/r/ncvs/src/usr.bin/lockf/lockf.c,v 1.10 
2002/06/30 05:25:04 obrien Exp $");

 #include <sys/types.h>
 #include <sys/wait.h>
@@ -194,7 +193,7 @@
  * Signal handler for SIGALRM.
  */
 static void
-timeout(int sig __unused)
+timeout(int sig)
 {
     timed_out = 1;
 }
@@ -223,3 +222,5 @@
     close(fd);
     return;
 }
+
+

----- Original Message ----- 
From: "Hanspeter Roth" <hampi@rootshell.be>
To: <netbsd-users@NetBSD.org>
Sent: Wednesday, April 07, 2004 10:53 PM
Subject: Re: lockf


>  On Apr 07 at 11:43, Stefan Sonnenberg-Carstens spoke:
>
>> NetBSD in at least version 1.6.2 doesn't has it, but
>> I managed to get it compiled from the FreeBSD sources.
>>
>>
>> the changed source is below.
>
> I tried the one from 4.9 and it built without changes.
> You didn't show the changes (diff -u) you made.
>
>> compile using :
>> gcc lockf.c -o lockf
>
> I also copied the Makefile and it built just with `make'.
>
> -Hanspeter
>
>