Skip to contentSkip to conversation

linux-user F_DUPFD_CLOEXEC fix

PATCH In review Vince Weaver 2 participants 2 messages Sep 9, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linux-user F_DUPFD_CLOEXEC fix

Hello

on older machines, the F_DUPFD_CLOEXEC define is not available. So linux-user targets fail to compile.

This fix simply disables the feature if it's not available.

Vince

linux-user/syscall.c +2 -0
index 25b95ea..6fdb9f1 100644
@@ -3685,8 +3685,10 @@ static int target_to_host_fcntl_cmd(int cmd)
             return F_SETLEASE;
         case TARGET_F_GETLEASE:
             return F_GETLEASE;
+#ifdef F_DUPFD_CLOEXEC       
         case TARGET_F_DUPFD_CLOEXEC:
             return F_DUPFD_CLOEXEC;
+#endif       
         case TARGET_F_NOTIFY:
             return F_NOTIFY;
 	default:
#1 lore raw
Quoted 6 lines · Vince Weaver

Hello

on older machines, the F_DUPFD_CLOEXEC define is not available. So linux-user targets fail to compile.

This fix simply disables the feature if it's not available.

Seconded.

Quoted 22 lines

Vince

linux-user/syscall.c +2 -0
index 25b95ea..6fdb9f1 100644
@@ -3685,8 +3685,10 @@ static int target_to_host_fcntl_cmd(int cmd)
             return F_SETLEASE;
         case TARGET_F_GETLEASE:
             return F_GETLEASE;
+#ifdef F_DUPFD_CLOEXEC       
         case TARGET_F_DUPFD_CLOEXEC:
             return F_DUPFD_CLOEXEC;
+#endif       
         case TARGET_F_NOTIFY:
             return F_NOTIFY;
 	default:
Signature · 1 line
mailto:[email protected]