From 18c432b83a23181b81360d2f622bbb0c91fdb36d Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 25 Jul 2014 14:28:14 +0200 Subject: osdep: don't assume errno is positive Apparently this is not necessarily the case, so just drop the silly idea that depended on this assumption. --- osdep/io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'osdep') diff --git a/osdep/io.c b/osdep/io.c index 27235e092c..8423a6beff 100644 --- a/osdep/io.c +++ b/osdep/io.c @@ -46,7 +46,7 @@ bool mp_set_cloexec(int fd) int mp_make_wakeup_pipe(int pipes[2]) { pipes[0] = pipes[1] = -1; - return -ENOSYS; + return -1; } #else // create a pipe, and set it to non-blocking (and also set FD_CLOEXEC) @@ -54,7 +54,7 @@ int mp_make_wakeup_pipe(int pipes[2]) { if (pipe(pipes) != 0) { pipes[0] = pipes[1] = -1; - return -errno; + return -1; } for (int i = 0; i < 2; i++) { -- cgit v1.2.3