Index: SConstruct
--- SConstruct.orig	2009-05-04 19:57:36 +0200
+++ SConstruct	2009-05-08 20:05:57 +0200
@@ -85,7 +85,7 @@
 ################################
 
 # Add default CCFLAGS
-env.Append(CCFLAGS = '-std=c99 -D_XOPEN_SOURCE=600 -Wall -Wextra -pedantic -O2')
+env.Append(CCFLAGS = '-std=c99 -D_XOPEN_SOURCE=600 -O2')
 
 debug = ARGUMENTS.get('debug', 0)
 if int(debug):
@@ -96,8 +96,8 @@
 if int(lfs):
 	# Save flags in their own construction environment variables so they can be
 	# use in creating the pkg-config file
-	env['lfs_cflags'] = commands.getoutput("getconf LFS_CFLAGS")
-	env['lfs_ldflags'] = commands.getoutput("getconf LFS_LDFLAGS")
+	env['lfs_cflags'] = ""
+	env['lfs_ldflags'] = ""
 	env.Append(CCFLAGS = '$lfs_cflags') 
 	env.Append(LINKFLAGS = '$lfs_ldflags') 
 else:
Index: scons_helpers.py
--- scons_helpers.py.orig	2009-05-04 19:57:36 +0200
+++ scons_helpers.py	2009-05-08 20:06:06 +0200
@@ -182,7 +182,7 @@
 
 	lib_name = target[prefix_length:suffix_index]
 	
-	lib = env_lib.SharedLibrary(lib_name, source)
+	lib = env_lib.StaticLibrary(lib_name, source)
 
 	lnk1, lnk2 = create_library_links(str(lib[0]), soname, env)
 	
Index: src/buffer_file.c
--- src/buffer_file.c.orig	2009-05-04 19:57:36 +0200
+++ src/buffer_file.c	2009-05-08 20:05:57 +0200
@@ -26,6 +26,7 @@
 #include <errno.h>
 #include <stdlib.h>
 #include <sys/types.h>
+#include <sys/stat.h>
 #include <unistd.h>
 #include <string.h>
 #include <fcntl.h>
