diff -ru t/arla-0.40/configure arla-0.40/configure
--- t/arla-0.40/configure	Mon Jun 20 19:44:58 2005
+++ arla-0.40/configure	Mon Aug  1 19:25:46 2005
@@ -6767,8 +6767,9 @@
   	freebsd5*)
 		FREEBSD5=yes
 		# XXX GCC3 stuff
-		KERNEL_CFLAGS="${KERNEL_CFLAGS}${KERNEL_CFLAGS:+ }-ffreestanding -ansi"
-		;;
+		#KERNEL_CFLAGS="${KERNEL_CFLAGS}${KERNEL_CFLAGS:+ }-ffreestanding -ansi"
+		KERNEL_CFLAGS="${KERNEL_CFLAGS}${KERNEL_CFLAGS:+ }-finline-limit=8000 -fno-common -mcmodel=kernel -mno-red-zone  -mfpmath=387 -mno-sse -mno-sse2 -mno-mmx -mno-3dnow  -msoft-float  -fno-asynchronous-unwind-tables -fformat-extensions -Wall -Wmissing-prototypes -Wpointer-arith -Wmissing-declarations -Wnested-externs -ffreestanding -ansi"
+ 		;;
   esac
 
 
diff -ru t/arla-0.40/nnpfs/bsd/Makefile.in arla-0.40/nnpfs/bsd/Makefile.in
--- t/arla-0.40/nnpfs/bsd/Makefile.in	Sat Mar 26 11:58:45 2005
+++ arla-0.40/nnpfs/bsd/Makefile.in	Sat Jul 30 12:33:56 2005
@@ -79,11 +79,14 @@
 @DFLY_FALSE@@FBSD5_FALSE@	pre=setdef0.o post=setdef1.o ;
 @DFLY_TRUE@@FBSD5_FALSE@FBSD_LINK_HACK=
 @FBSD5_TRUE@@FBSD5_FALSE@FBSD_LINK_HACK=
+@FBSD5_TRUE@KLD_LDFLAGS=	-r
+@FBSD5_FALSE@KLD_LDFLAGS=	-Bshareable
+
 
 nnpfs.ko:	$(MODULE_OBJS)
 	if test `objformat` = "elf"; then \
 	  $(FBSD_LINK_HACK) \
-	  $(LD) -Bshareable -o $@ $${pre} $(MODULE_OBJS) $${post}; \
+	  $(LD) $(KLD_LDFLAGS) -o $@ $${pre} $(MODULE_OBJS) $${post}; \
 	else \
 	  $(LD) -Bshareable -o $@ $(MODULE_OBJS); \
 	fi
diff -ru t/arla-0.40/nnpfs/bsd/nnpfs_message.c arla-0.40/nnpfs/bsd/nnpfs_message.c
--- t/arla-0.40/nnpfs/bsd/nnpfs_message.c	Wed Dec 22 20:37:45 2004
+++ arla-0.40/nnpfs/bsd/nnpfs_message.c	Tue Jul  5 22:38:20 2005
@@ -441,7 +441,7 @@
 		       d_thread_t *p)
 {
     struct nnpfs_node *node;
-    int i;
+    unsigned int i;
 
     NNPFSDEB(XDEBMSG, ("nnpfs_message_gc\n"));
 
