Skip to contentSkip to conversation

Include futex.h properly.

PATCH In review Felipe Contreras 3 participants 4 messages Jun 2, 2008 – Jun 3, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Include futex.h properly.

This wasn't building properly on my system.

---
 configure            |    2 +-
 linux-user/syscall.c |    7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)
configure +1 -1
index 4a4ba36..f204d04 100755
@@ -648,7 +648,7 @@ EOF
 # Check host NPTL support
 cat > $TMPC <<EOF
 #include <sched.h>
-#include <sys/futex.h>
+#include <linux/futex.h>
 void foo()
 {
 #if !defined(CLONE_SETTLS) || !defined(FUTEX_WAIT)
linux-user/syscall.c +4 -3
index 5f2b48a..25b9e5a 100644
@@ -52,9 +52,6 @@
 //#include <sys/user.h>
 #include <netinet/ip.h>
 #include <netinet/tcp.h>
-#if defined(USE_NPTL)
-#include <sys/futex.h>
-#endif
 
 #define termios host_termios
 #define winsize host_winsize
@@ -75,6 +72,10 @@
 
 #include "qemu.h"
 
+#if defined(USE_NPTL)
+#include <linux/futex.h>
+#endif
+
 //#define DEBUG
 
 #if defined(TARGET_I386) || defined(TARGET_ARM) || defined(TARGET_SPARC) \
Signature · 1 line
1.5.6.rc0.29.g3beb5
#1 lore raw
Quoted 11 lines · Felipe Contreras

This wasn't building properly on my system.

---
 configure            |    2 +-
 linux-user/syscall.c |    7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)
configure +0 -0
index 4a4ba36..f204d04 100755

configure EOF · line 652

Quoted 6 lines
configure +1 -1
@@ -648,7 +648,7 @@ EOF
 # Check host NPTL support
 cat > $TMPC <<EOF
 #include <sched.h>
-#include <sys/futex.h>
+#include <linux/futex.h>
 

I don't have a sys/futex.h on my system either. The futex man page claims that linux/futex.h should be what's included. What system is sys/futex.h valid on and does that system break with linux/futex.h?

Regards,

Anthony Liguori

Quoted 29 lines
configure +0 -0
 void foo()
 {

#if !defined(CLONE_SETTLS) || !defined(FUTEX_WAIT)

linux-user/syscall.c +4 -3
index 5f2b48a..25b9e5a 100644
@@ -52,9 +52,6 @@
 //#include <sys/user.h>
 #include <netinet/ip.h>
 #include <netinet/tcp.h>
-#if defined(USE_NPTL)
-#include <sys/futex.h>
-#endif
 
 #define termios host_termios
 #define winsize host_winsize
@@ -75,6 +72,10 @@
 
 #include "qemu.h"
 
+#if defined(USE_NPTL)
+#include <linux/futex.h>
+#endif
+
 //#define DEBUG
 
 #if defined(TARGET_I386) || defined(TARGET_ARM) || defined(TARGET_SPARC) \
#2 lore raw
Quoted 6 lines

configure EOF · line 651

Quoted 2 lines
configure +1 -1
-#include <sys/futex.h>
+#include <linux/futex.h>

I don't have a sys/futex.h on my system either. The futex man page claims that linux/futex.h should be what's included. What system is sys/futex.h valid on and does that system break with linux/futex.h?

sys/futex.h was a typo made when pulling this change out of a larger patch. I built it to check that it "worked", but didn't check that the configure check actually passed.

Paul

#3 lore raw
In reply to Anthony Liguori
Quoted 8 lines · Anthony Liguori
Quoted 7 lines · Felipe Contreras

This wasn't building properly on my system.

---
 configure            |    2 +-
 linux-user/syscall.c |    7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)
Quoted 15 lines

configure EOF · line 652

Quoted 11 lines
configure +1 -1
index 4a4ba36..f204d04 100755
@@ -648,7 +648,7 @@ EOF
 # Check host NPTL support
 cat > $TMPC <<EOF
 #include <sched.h>
-#include <sys/futex.h>
+#include <linux/futex.h>
 

I don't have a sys/futex.h on my system either. The futex man page claims that linux/futex.h should be what's included. What system is sys/futex.h valid on and does that system break with linux/futex.h?

According to Google it's from dietlibc.

Signature · 1 line
Felipe Contreras