[Intel-gfx] [PATCH 1/3] xf86-video-intel: Fix fd_set_nonblock
Hans de Goede
hdegoede at redhat.com
Sat Feb 15 00:02:35 CET 2014
O_NONBLOCK is a status flag not a descriptor flag, so F_GETFL / F_SETFL should
be used to modify it.
Signed-off-by: Hans de Goede <hdegoede at redhat.com>
---
src/intel_device.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/intel_device.c b/src/intel_device.c
index effda24..07b7d2e 100644
--- a/src/intel_device.c
+++ b/src/intel_device.c
@@ -167,10 +167,10 @@ static int fd_set_nonblock(int fd)
if (fd == -1)
return fd;
- flags = fcntl(fd, F_GETFD);
+ flags = fcntl(fd, F_GETFL);
if (flags != -1) {
flags |= O_NONBLOCK;
- fcntl(fd, F_SETFD, flags);
+ fcntl(fd, F_SETFL, flags);
}
return fd;
--
1.8.5.3
More information about the Intel-gfx
mailing list