summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/libaio
diff options
context:
space:
mode:
authorPhil Staub <Phil.Staub@windriver.com>2013-01-31 08:35:25 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-02-01 15:54:00 +0000
commit9a9586c23033c5c15409776155412a1ad4efaaca (patch)
treed640daf1134bc104c2cc485c53f2156d208776ed /meta/recipes-extended/libaio
parent12e76e123f66c36910f1fadece620024b2264a26 (diff)
downloadpoky-9a9586c23033c5c15409776155412a1ad4efaaca.tar.gz
libaio: Fix MIPS system call interface
The io_syscallX wrappers in syscall-mips.h discard error return status by overwriting the value returned in v0 from the system call with -1. Modify this behavior by returning the negative of the return value on error (as identified by a3 != 0). This convention is consistent with the behavior observed in syscall-ppc.h. For a description of the MIPS system call interface, see: http://www.linux-mips.org/wiki/Syscall (From OE-Core rev: 0d8f50c33e5ff71dc17121b5c293718a8ad602bd) Signed-off-by: Phil Staub <Phil.Staub@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/libaio')
-rw-r--r--meta/recipes-extended/libaio/libaio/libaio_fix_for_mips_syscalls.patch62
-rw-r--r--meta/recipes-extended/libaio/libaio_0.3.109.bb3
2 files changed, 64 insertions, 1 deletions
diff --git a/meta/recipes-extended/libaio/libaio/libaio_fix_for_mips_syscalls.patch b/meta/recipes-extended/libaio/libaio/libaio_fix_for_mips_syscalls.patch
new file mode 100644
index 0000000000..022276af83
--- /dev/null
+++ b/meta/recipes-extended/libaio/libaio/libaio_fix_for_mips_syscalls.patch
@@ -0,0 +1,62 @@
1Upstream status: Inappropriate [embedded specific]
2
3Signed-off-by: Phil Staub <Phil.Staub@windriver.com>
4
5Index: libaio-0.3.109/src/syscall-mips.h
6===================================================================
7--- libaio-0.3.109.orig/src/syscall-mips.h
8+++ libaio-0.3.109/src/syscall-mips.h
9@@ -76,7 +76,7 @@ type fname(atype a) \
10 \
11 if (__a3 == 0) \
12 return (type) __v0; \
13- return (type) -1; \
14+ return (type) (-(__v0)); \
15 }
16
17 #define io_syscall2(type,fname,sname,atype,a,btype,b) \
18@@ -100,7 +100,7 @@ type fname(atype a, btype b) \
19 \
20 if (__a3 == 0) \
21 return (type) __v0; \
22- return (type) -1; \
23+ return (type) (-(__v0)); \
24 }
25
26 #define io_syscall3(type,fname,sname,atype,a,btype,b,ctype,c) \
27@@ -125,7 +125,7 @@ type fname(atype a, btype b, ctype c) \
28 \
29 if (__a3 == 0) \
30 return (type) __v0; \
31- return (type) -1; \
32+ return (type) (-(__v0)); \
33 }
34
35 #define io_syscall4(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d) \
36@@ -150,7 +150,7 @@ type fname(atype a, btype b, ctype c, dt
37 \
38 if (__a3 == 0) \
39 return (type) __v0; \
40- return (type) -1; \
41+ return (type) (-(__v0)); \
42 }
43
44 #if (_MIPS_SIM == _MIPS_SIM_ABI32)
45@@ -186,7 +186,7 @@ type fname(atype a, btype b, ctype c, dt
46 \
47 if (__a3 == 0) \
48 return (type) __v0; \
49- return (type) -1; \
50+ return (type) (-(__v0)); \
51 }
52
53 #endif /* (_MIPS_SIM == _MIPS_SIM_ABI32) */
54@@ -216,7 +216,7 @@ type fname (atype a,btype b,ctype c,dtyp
55 \
56 if (__a3 == 0) \
57 return (type) __v0; \
58- return (type) -1; \
59+ return (type) (-(__v0)); \
60 }
61
62 #endif /* (_MIPS_SIM == _MIPS_SIM_NABI32) || (_MIPS_SIM == _MIPS_SIM_ABI64) */
diff --git a/meta/recipes-extended/libaio/libaio_0.3.109.bb b/meta/recipes-extended/libaio/libaio_0.3.109.bb
index afe9adff65..978f5f5fb5 100644
--- a/meta/recipes-extended/libaio/libaio_0.3.109.bb
+++ b/meta/recipes-extended/libaio/libaio_0.3.109.bb
@@ -5,7 +5,7 @@ HOMEPAGE = "http://lse.sourceforge.net/io/aio.html"
5LICENSE = "LGPLv2.1+" 5LICENSE = "LGPLv2.1+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=d8045f3b8f929c1cb29a1e3fd737b499" 6LIC_FILES_CHKSUM = "file://COPYING;md5=d8045f3b8f929c1cb29a1e3fd737b499"
7 7
8PR = "r1" 8PR = "r2"
9 9
10SRC_URI = "${DEBIAN_MIRROR}/main/liba/libaio/libaio_${PV}.orig.tar.gz \ 10SRC_URI = "${DEBIAN_MIRROR}/main/liba/libaio/libaio_${PV}.orig.tar.gz \
11 file://00_arches.patch \ 11 file://00_arches.patch \
@@ -14,6 +14,7 @@ SRC_URI = "${DEBIAN_MIRROR}/main/liba/libaio/libaio_${PV}.orig.tar.gz \
14 file://libaio_fix_for_x32.patch \ 14 file://libaio_fix_for_x32.patch \
15 file://libaio-generic.patch \ 15 file://libaio-generic.patch \
16 file://libaio-aarch64.patch \ 16 file://libaio-aarch64.patch \
17 file://libaio_fix_for_mips_syscalls.patch \
17" 18"
18 19
19SRC_URI[md5sum] = "435a5b16ca6198eaf01155263d855756" 20SRC_URI[md5sum] = "435a5b16ca6198eaf01155263d855756"