• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/uclibc/0.9.33.2/uclibc-0032-pread-pwrite-handle-renamed-syscalls-in-common-ppc-x.patch
Peter KorsgaardPeter Korsgaard committed 055f1c02d3506 Sep 2013
Raw file
Source viewDiff to previous
xxxxxxxxxx
 
1
From 923e6f201b1d792cf069ca7f13c3715f4e9c9353 Mon Sep 17 00:00:00 2001
2
From: Mike Frysinger <vapier@gentoo.org>
3
Date: Wed, 30 May 2012 01:15:03 -0400
4
Subject: [PATCH] pread/pwrite: handle renamed syscalls in common/ppc/xtensa
5
 code
6
​
7
Some arches got this fix, but many did not.  So copy the ifdef logic to
8
the ones that missed it to fix behavior in linux-2.6+.
9
​
10
URL: https://bugs.busybox.net/show_bug.cgi?id=5258
11
Reported-by: David Laight <david.laight@aculab.com>
12
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13
---
14
 libc/sysdeps/linux/common/pread_write.c  |   12 +++++++++++-
15
 libc/sysdeps/linux/powerpc/pread_write.c |   13 +++++++++++++
16
 libc/sysdeps/linux/xtensa/pread_write.c  |   14 ++++++++++++++
17
 3 files changed, 38 insertions(+), 1 deletion(-)
18
​
19
diff --git a/libc/sysdeps/linux/common/pread_write.c b/libc/sysdeps/linux/common/pread_write.c
20
index c142038..b13de66 100644
21
--- a/libc/sysdeps/linux/common/pread_write.c
22
+++ b/libc/sysdeps/linux/common/pread_write.c
23
@@ -35,6 +35,11 @@ extern __typeof(pread64) __libc_pread64;
24
 extern __typeof(pwrite64) __libc_pwrite64;
25
 #endif
26
 
27
+#ifdef __NR_pread64             /* Newer kernels renamed but it's the same.  */
28
+# undef __NR_pread
29
+# define __NR_pread __NR_pread64
30
+#endif
31
+
32
 #include <bits/kernel_types.h>
33
 
34
 # define __NR___syscall_pread __NR_pread64
35
@@ -64,7 +69,12 @@ ssize_t __libc_pread64(int fd, void *buf, size_t count, off64_t offset)
36
 weak_alias(__libc_pread64,pread64)
37
 # endif /* __UCLIBC_HAS_LFS__  */
38
 
39
-# define __NR___syscall_pwrite __NR_pwrite64
40
+#ifdef __NR_pwrite64             /* Newer kernels renamed but it's the same.  */
41
+# undef __NR_pwrite
42
+# define __NR_pwrite __NR_pwrite64
43
+#endif
44
+
45
+# define __NR___syscall_pwrite __NR_pwrite
46
 static __inline__ _syscall5(ssize_t, __syscall_pwrite, int, fd, const void *, buf,
47
        size_t, count, off_t, offset_hi, off_t, offset_lo)
48
 
49
diff --git a/libc/sysdeps/linux/powerpc/pread_write.c b/libc/sysdeps/linux/powerpc/pread_write.c
50
index 7f988d3..23f256f 100644
51
--- a/libc/sysdeps/linux/powerpc/pread_write.c
52
+++ b/libc/sysdeps/linux/powerpc/pread_write.c
53
@@ -20,6 +20,13 @@
54
 # define off64_t off_t
55
 #endif
56
 
57
+#ifdef __NR_pread64             /* Newer kernels renamed but it's the same.  */
58
+# ifdef __NR_pread
59
+#  error "__NR_pread and __NR_pread64 both defined???"
60
+# endif
61
+# define __NR_pread __NR_pread64
62
+#endif
63
+
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.