Browse Source

uclibc: added patches from upstream to add SOCK_CLOEXEC and inotify1 to uclibc .31 (see note)

these two patches will become redundant with uclibc .32, they will have to be removed at upgrade.
stable/0.2
Nagy Karoly Gabriel 14 years ago
parent
commit
b2fc1ddd06
  1. 80
      base/uclibc/uClibc-0.9.31-add-inotify-init1.patch
  2. 59
      base/uclibc/uClibc-0.9.31-add-sock-cloexec.patch

80
base/uclibc/uClibc-0.9.31-add-inotify-init1.patch

@ -0,0 +1,80 @@
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../uclibc/uClibc-0.9.31-add-inotify-init1.patch
# Copyright (C) 2011 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- SDE-COPYRIGHT-NOTE-END ---
From a2e5630af426f85fdd8721b2820786d9bd2aa695 Mon Sep 17 00:00:00 2001
From: Vladimir Zapolskiy <vzapolskiy@gmail.com>
Date: Tue, 1 Jun 2010 20:02:54 +0400
Subject: [PATCH] inotify: add inotify_init1 system call support
This patch introduces support for inotify_init1 system call, found
since Linux 2.6.27.
Signed-off-by: Vladimir Zapolskiy <vzapolskiy@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
libc/sysdeps/linux/common/inotify.c | 4 ++++
libc/sysdeps/linux/common/sys/inotify.h | 13 +++++++++++++
2 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/libc/sysdeps/linux/common/inotify.c b/libc/sysdeps/linux/common/inotify.c
index e5a6120..e35f043 100644
--- a/libc/sysdeps/linux/common/inotify.c
+++ b/libc/sysdeps/linux/common/inotify.c
@@ -15,6 +15,10 @@
_syscall0(int, inotify_init)
#endif
+#ifdef __NR_inotify_init1
+_syscall1(int, inotify_init1, int, flags)
+#endif
+
#ifdef __NR_inotify_add_watch
_syscall3(int, inotify_add_watch, int, fd, const char *, path, uint32_t, mask)
#endif
diff --git a/libc/sysdeps/linux/common/sys/inotify.h b/libc/sysdeps/linux/common/sys/inotify.h
index 0131db9..dc4e19d 100644
--- a/libc/sysdeps/linux/common/sys/inotify.h
+++ b/libc/sysdeps/linux/common/sys/inotify.h
@@ -22,6 +22,16 @@
#include <stdint.h>
+/* Flags for the parameter of inotify_init1. */
+enum
+ {
+ IN_CLOEXEC = 02000000,
+#define IN_CLOEXEC IN_CLOEXEC
+ IN_NONBLOCK = 04000
+#define IN_NONBLOCK IN_NONBLOCK
+ };
+
+
/* Structure describing an inotify event. */
struct inotify_event
{
@@ -79,6 +89,9 @@ __BEGIN_DECLS
/* Create and initialize inotify instance. */
extern int inotify_init (void) __THROW;
+/* Create and initialize inotify instance. */
+extern int inotify_init1 (int __flags) __THROW;
+
/* Add watch of object NAME to inotify instance FD. Notify about
events specified by MASK. */
extern int inotify_add_watch (int __fd, const char *__name, uint32_t __mask)
--
1.7.3.4

59
base/uclibc/uClibc-0.9.31-add-sock-cloexec.patch

@ -0,0 +1,59 @@
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../uclibc/uClibc-0.9.31-add-sock-cloexec.patch
# Copyright (C) 2011 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- SDE-COPYRIGHT-NOTE-END ---
author Vladimir Zapolskiy <vzapolskiy@gmail.com> 2010-06-01 16:02:39 (GMT)
committer Khem Raj <raj.khem@gmail.com> 2010-06-01 19:39:15 (GMT)
commit 83333e9c873e4eca6b2c945f7770b1f5373b0427 (patch)
tree 180a78c4fea20bcfab59fc73c615e44c2ca13bb3
parent b2c4199f0fd53c009858e7ce27f932a4ac92bc60 (diff)
download uClibc-83333e9c873e4eca6b2c945f7770b1f5373b0427.tar.gz
uClibc-83333e9c873e4eca6b2c945f7770b1f5373b0427.tar.bz2
bits/socket.h: add SOCK_CLOEXEC and SOCK_NONBLOCK support
This patch adds support for SOCK_CLOEXEC and SOCK_NONBLOCK socket
descriptor flags, which are introduced since Linux 2.6.27
Signed-off-by: Vladimir Zapolskiy <vzapolskiy@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat
-rw-r--r-- libc/sysdeps/linux/common/bits/socket.h 12
1 files changed, 11 insertions, 1 deletions
diff --git a/libc/sysdeps/linux/common/bits/socket.h b/libc/sysdeps/linux/common/bits/socket.h
index ac5a433..11f6e97 100644
--- a/libc/sysdeps/linux/common/bits/socket.h
+++ b/libc/sysdeps/linux/common/bits/socket.h
@@ -53,10 +53,20 @@ enum __socket_type
SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based,
datagrams of fixed maximum length. */
#define SOCK_SEQPACKET SOCK_SEQPACKET
- SOCK_PACKET = 10 /* Linux specific way of getting packets
+ SOCK_PACKET = 10, /* Linux specific way of getting packets
at the dev level. For writing rarp and
other similar things on the user level. */
#define SOCK_PACKET SOCK_PACKET
+
+ /* 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
+ new descriptor(s). */
+#define SOCK_CLOEXEC SOCK_CLOEXEC
+ SOCK_NONBLOCK = 04000 /* Atomically mark descriptor(s) as
+ non-blocking. */
+#define SOCK_NONBLOCK SOCK_NONBLOCK
};
/* Protocol families. */
Loading…
Cancel
Save