From fa1b9bae63e87161783dafaf3187251901216bad Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Mon, 1 Feb 2010 17:52:33 -0500 Subject: [PATCH] Fix SOCK_CLOEXEC for accept4 Adjust the value of SOCK_CLOEXEC to match the kernel value used for accept4. This has never worked in the past, and all old applications are broken, therefore we change this value to match the kernel value. --- ChangeLog.hppa | 5 +++++ sysdeps/unix/sysv/linux/hppa/bits/socket.h | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 4ccc1df435..28a3c44e72 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,8 @@ +2010-02-01 Kyle McMartin + + * sysdeps/unix/sysv/linux/hppa/bits/socket.h: Fix value of + SOCK_CLOEXEC to match O_CLOEXEC. + 2010-02-01 Carlos O'Donell * sysdeps/unix/sysv/linux/hppa/Versions: Bump diff --git a/sysdeps/unix/sysv/linux/hppa/bits/socket.h b/sysdeps/unix/sysv/linux/hppa/bits/socket.h index ac6e81b0ff..bcc27ccc6f 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/socket.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/socket.h @@ -1,6 +1,6 @@ /* System-specific socket constants and types. Linux version. - Copyright (C) 1991, 1992, 1994-2001, 2004, 2006, 2007, 2008, 2009 - Free Software Foundation, Inc. + Copyright (C) 1991, 1992, 1994-2001, 2004, 2006, 2007, 2008, 2009, + 2010 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -62,7 +62,7 @@ enum __socket_type /* Flags to be ORed into the type parameter of socket and socketpair and used for the flags parameter of paccept. */ - SOCK_CLOEXEC = 02000000, /* Atomically set close-on-exec flag for the + SOCK_CLOEXEC = 01000000, /* Atomically set close-on-exec flag for the new descriptor(s). */ #define SOCK_CLOEXEC SOCK_CLOEXEC #undef SOCK_NONBLOCK