diff -Naur glibc-2.8.orig/ChangeLog glibc-2.8/ChangeLog
--- glibc-2.8.orig/ChangeLog	2008-12-18 09:19:52.000000000 -0500
+++ glibc-2.8/ChangeLog	2008-12-18 09:20:26.000000000 -0500
@@ -1,3 +1,7 @@
+2008-04-17  Jakub Jelinek  <jakub@redhat.com>
+
+	* sysdeps/unix/sysv/linux/dl-osinfo.h: Include fcntl.h.
+
 2008-04-11  Ulrich Drepper  <drepper@redhat.com>
 
 	* sysdeps/unix/sysv/linux/powerpc/bits/mathinline.h (__signbitl):
diff -Naur glibc-2.8.orig/nptl/ChangeLog glibc-2.8/nptl/ChangeLog
--- glibc-2.8.orig/nptl/ChangeLog	2008-12-18 09:19:54.000000000 -0500
+++ glibc-2.8/nptl/ChangeLog	2008-12-18 09:20:26.000000000 -0500
@@ -1,3 +1,8 @@
+2008-04-14  David S. Miller  <davem@davemloft.net>
+
+	* sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
+	(__old_sem_wait): Fix argument to lll_futex_wait().
+
 2007-11-26  Daniel Jacobowitz  <dan@codesourcery.com>
 
 	* pthread_create.c: Require pthread_mutex_trylock and
diff -Naur glibc-2.8.orig/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c glibc-2.8/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
--- glibc-2.8.orig/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c	2008-12-18 09:19:54.000000000 -0500
+++ glibc-2.8/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c	2008-12-18 09:20:26.000000000 -0500
@@ -155,7 +155,7 @@
       /* Enable asynchronous cancellation.  Required by the standard.  */
       int oldtype = __pthread_enable_asynccancel ();
 
-      err = lll_futex_wait (futex, 0,
+      err = lll_futex_wait (&isem->value, 0,
 			    isem->private ^ FUTEX_PRIVATE_FLAG);
 
       /* Disable asynchronous cancellation.  */
diff -Naur glibc-2.8.orig/sysdeps/unix/sysv/linux/dl-osinfo.h glibc-2.8/sysdeps/unix/sysv/linux/dl-osinfo.h
--- glibc-2.8.orig/sysdeps/unix/sysv/linux/dl-osinfo.h	2008-12-18 09:19:54.000000000 -0500
+++ glibc-2.8/sysdeps/unix/sysv/linux/dl-osinfo.h	2008-12-18 09:20:26.000000000 -0500
@@ -19,6 +19,7 @@
 
 #include <kernel-features.h>
 #include <dl-sysdep.h>
+#include <fcntl.h>
 #include <stdint.h>
 
 #ifndef MIN
