Commit 6a375cb
committed
core-shim: fix incorrect errno and return when using posix_madvise
posix_madvise returns a +ve errno value unlike madvise; fix
the current implementation to return -1 and set errno as per
the madvise semantics.
Kudos to Christian Franke for reporting this issue with a suitable
suggested fix.
Closes: #636
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>1 parent 165c6c9 commit 6a375cb
1 file changed
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1163 | 1163 | | |
1164 | 1164 | | |
1165 | 1165 | | |
| 1166 | + | |
1166 | 1167 | | |
1167 | 1168 | | |
1168 | 1169 | | |
| |||
1199 | 1200 | | |
1200 | 1201 | | |
1201 | 1202 | | |
1202 | | - | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
1203 | 1210 | | |
1204 | 1211 | | |
1205 | 1212 | | |
| |||
0 commit comments