From: Hans de Goede Subject: [PATCH 1/3] xf86-video-intel: Fix fd_set_nonblock Date: Sat, 15 Feb 2014 00:02:35 +0100 Message-ID: <1392418957-12889-1-git-send-email-hdegoede@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by gabe.freedesktop.org (Postfix) with ESMTP id A9603FA67B for ; Fri, 14 Feb 2014 15:02:40 -0800 (PST) Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s1EN2eZx002381 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 14 Feb 2014 18:02:40 -0500 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org To: intel-gfx@lists.freedesktop.org Cc: peter.hutterer@redhat.com List-Id: intel-gfx@lists.freedesktop.org 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 --- 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