summaryrefslogtreecommitdiffstats
path: root/meta/packages/glibc/glibc-2.4/glibc-2.4-openat-3.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/glibc/glibc-2.4/glibc-2.4-openat-3.patch')
-rw-r--r--meta/packages/glibc/glibc-2.4/glibc-2.4-openat-3.patch133
1 files changed, 0 insertions, 133 deletions
diff --git a/meta/packages/glibc/glibc-2.4/glibc-2.4-openat-3.patch b/meta/packages/glibc/glibc-2.4/glibc-2.4-openat-3.patch
deleted file mode 100644
index d3f37f6c36..0000000000
--- a/meta/packages/glibc/glibc-2.4/glibc-2.4-openat-3.patch
+++ /dev/null
@@ -1,133 +0,0 @@
1Submitted By: Jim Gifford (patches at jg555 dot com)
2Date: 2006-08-18
3Initial Package Version: 2.4
4Origin: http://sourceware.org/bugzilla/show_bug.cgi?id=2873
5Upstream Status: Applied
6Description: Fixes http://sourceware.org/bugzilla/show_bug.cgi?id=2873
7 http://sourceware.org/bugzilla/show_bug.cgi?id=3040
8 http://linuxfromscratch.org/pipermail/lfs-dev/2006-June/057562.html
9 Updated by Joe Ciccone
10
11diff -Naur glibc-2.4.orig/sysdeps/unix/sysv/linux/i386/fchownat.c glibc-2.4/sysdeps/unix/sysv/linux/i386/fchownat.c
12--- glibc-2.4.orig/sysdeps/unix/sysv/linux/i386/fchownat.c 2006-02-23 14:50:21.000000000 -0800
13+++ glibc-2.4/sysdeps/unix/sysv/linux/i386/fchownat.c 2006-08-18 20:38:21.773288795 -0700
14@@ -61,6 +61,24 @@
15 int
16 fchownat (int fd, const char *file, uid_t owner, gid_t group, int flag)
17 {
18+ int result;
19+
20+#ifdef __NR_fchownat
21+# ifndef __ASSUME_ATFCTS
22+ if (__have_atfcts >= 0)
23+# endif
24+ {
25+ result = INLINE_SYSCALL (fchownat, 5, fd, file, owner, group, flag);
26+# ifndef __ASSUME_ATFCTS
27+ if (result == -1 && errno == ENOSYS)
28+ __have_atfcts = -1;
29+ else
30+# endif
31+ return result;
32+ }
33+#endif
34+
35+#ifndef __ASSUME_ATFCTS
36 if (flag & ~AT_SYMLINK_NOFOLLOW)
37 {
38 __set_errno (EINVAL);
39@@ -87,14 +105,13 @@
40 file = buf;
41 }
42
43- int result;
44 INTERNAL_SYSCALL_DECL (err);
45
46-#if defined __NR_lchown || __ASSUME_LCHOWN_SYSCALL > 0
47-# if __ASSUME_LCHOWN_SYSCALL == 0
48+# if defined __NR_lchown || __ASSUME_LCHOWN_SYSCALL > 0
49+# if __ASSUME_LCHOWN_SYSCALL == 0
50 static int __libc_old_chown;
51
52-# ifdef __NR_chown32
53+# ifdef __NR_chown32
54 if (__libc_missing_32bit_uids <= 0)
55 {
56 if (flag & AT_SYMLINK_NOFOLLOW)
57@@ -111,7 +128,7 @@
58
59 __libc_missing_32bit_uids = 1;
60 }
61-# endif /* __NR_chown32 */
62+# endif /* __NR_chown32 */
63
64 if (((owner + 1) > (uid_t) ((__kernel_uid_t) -1U))
65 || ((group + 1) > (gid_t) ((__kernel_gid_t) -1U)))
66@@ -135,13 +152,13 @@
67
68 result = INTERNAL_SYSCALL (lchown, err, 3, CHECK_STRING (file), owner,
69 group);
70-# elif __ASSUME_32BITUIDS
71+# elif __ASSUME_32BITUIDS
72 /* This implies __ASSUME_LCHOWN_SYSCALL. */
73 result = INTERNAL_SYSCALL (chown32, err, 3, CHECK_STRING (file), owner,
74 group);
75-# else
76+# else
77 /* !__ASSUME_32BITUIDS && ASSUME_LCHOWN_SYSCALL */
78-# ifdef __NR_chown32
79+# ifdef __NR_chown32
80 if (__libc_missing_32bit_uids <= 0)
81 {
82 result = INTERNAL_SYSCALL (chown32, err, 3, CHECK_STRING (file), owner,
83@@ -153,7 +170,7 @@
84
85 __libc_missing_32bit_uids = 1;
86 }
87-# endif /* __NR_chown32 */
88+# endif /* __NR_chown32 */
89 if (((owner + 1) > (uid_t) ((__kernel_uid_t) -1U))
90 || ((group + 1) > (gid_t) ((__kernel_gid_t) -1U)))
91 {
92@@ -162,10 +179,10 @@
93 }
94
95 result = INTERNAL_SYSCALL (chown, err, 3, CHECK_STRING (file), owner, group);
96-# endif
97-#else
98+# endif
99+# else
100 result = INTERNAL_SYSCALL (chown, err, 3, CHECK_STRING (file), owner, group);
101-#endif
102+# endif
103
104 if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (result, err), 0))
105 goto fail;
106@@ -175,4 +192,5 @@
107 fail:
108 __atfct_seterrno (INTERNAL_SYSCALL_ERRNO (result, err), fd, buf);
109 return -1;
110+#endif
111 }
112diff -Naur glibc-2.4.orig/sysdeps/unix/sysv/linux/openat.c glibc-2.4/sysdeps/unix/sysv/linux/openat.c
113--- glibc-2.4.orig/sysdeps/unix/sysv/linux/openat.c 2006-02-28 21:32:42.000000000 -0800
114+++ glibc-2.4/sysdeps/unix/sysv/linux/openat.c 2006-08-18 20:39:14.360012706 -0700
115@@ -29,8 +29,6 @@
116
117
118 #if !defined OPENAT && !defined __ASSUME_ATFCTS
119-# define OPENAT openat
120-
121 /* Set errno after a failed call. If BUF is not null,
122 it is a /proc/self/fd/ path name we just tried to use. */
123 void
124@@ -63,6 +61,9 @@
125 int __have_atfcts;
126 #endif
127
128+#ifndef OPENAT
129+# define OPENAT openat
130+#endif
131
132 #define OPENAT_NOT_CANCEL CONCAT (OPENAT)
133 #define CONCAT(name) CONCAT2 (name)