aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/libaio/libaio/libaio_fix_for_mips_syscalls.patch
blob: 9c6850c08a23abba22eb6a3c8bf288c0f02e20a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
Upstream-Status: Inappropriate [embedded specific]

Signed-off-by: Phil Staub <Phil.Staub@windriver.com>

Index: libaio-0.3.109/src/syscall-mips.h
===================================================================
--- libaio-0.3.109.orig/src/syscall-mips.h
+++ libaio-0.3.109/src/syscall-mips.h
@@ -76,7 +76,7 @@ type fname(atype a) \
 	\
 	if (__a3 == 0) \
 		return (type) __v0; \
-	return (type) -1; \
+	return (type) (-(__v0)); \
 }
 
 #define io_syscall2(type,fname,sname,atype,a,btype,b) \
@@ -100,7 +100,7 @@ type fname(atype a, btype b) \
 	\
 	if (__a3 == 0) \
 		return (type) __v0; \
-	return (type) -1; \
+	return (type) (-(__v0)); \
 }
 
 #define io_syscall3(type,fname,sname,atype,a,btype,b,ctype,c) \
@@ -125,7 +125,7 @@ type fname(atype a, btype b, ctype c) \
 	\
 	if (__a3 == 0) \
 		return (type) __v0; \
-	return (type) -1; \
+	return (type) (-(__v0)); \
 }
 
 #define io_syscall4(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d) \
@@ -150,7 +150,7 @@ type fname(atype a, btype b, ctype c, dt
 	\
 	if (__a3 == 0) \
 		return (type) __v0; \
-	return (type) -1; \
+	return (type) (-(__v0)); \
 }
 
 #if (_MIPS_SIM == _MIPS_SIM_ABI32)
@@ -186,7 +186,7 @@ type fname(atype a, btype b, ctype c, dt
 	\
 	if (__a3 == 0) \
 		return (type) __v0; \
-	return (type) -1; \
+	return (type) (-(__v0)); \
 }
 
 #endif /* (_MIPS_SIM == _MIPS_SIM_ABI32) */
@@ -216,7 +216,7 @@ type fname (atype a,btype b,ctype c,dtyp
 	\
 	if (__a3 == 0) \
 		return (type) __v0; \
-	return (type) -1; \
+	return (type) (-(__v0)); \
 }
 
 #endif /* (_MIPS_SIM == _MIPS_SIM_NABI32) || (_MIPS_SIM == _MIPS_SIM_ABI64) */