From patchwork Fri Feb 8 15:02:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Engestrom X-Patchwork-Id: 10803249 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0130213B5 for ; Fri, 8 Feb 2019 15:03:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E64972E0BE for ; Fri, 8 Feb 2019 15:03:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DA19F2E678; Fri, 8 Feb 2019 15:03:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8B28A2E0BE for ; Fri, 8 Feb 2019 15:03:35 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 263A36E316; Fri, 8 Feb 2019 15:03:33 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7CD2F6E316 for ; Fri, 8 Feb 2019 15:03:32 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Feb 2019 07:03:31 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,347,1544515200"; d="scan'208";a="114696700" Received: from svenwest-mobl.isw.intel.com (HELO eengestr-dev.ger.corp.intel.com) ([10.251.87.70]) by orsmga006.jf.intel.com with ESMTP; 08 Feb 2019 07:03:30 -0800 From: Eric Engestrom To: dri-devel@lists.freedesktop.org Subject: [PATCH libdrm] xf86drm: fix return type for drmIsMaster() Date: Fri, 8 Feb 2019 15:02:07 +0000 Message-Id: <20190208150207.25237-1-eric.engestrom@intel.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Organization: Intel Corp UK X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Christopher James Halse Rogers , Emil Velikov Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Xserver has struct members named `bool`, which means the last commit breaks its build with errors like this: error: two or more data types in declaration specifiers Bool bool; ^ Fix this by making it return a 0/1 integer, with the same semantic as the boolean it was before. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=109587 Fixes: 17dfe3ac93217b43f93b "xf86drm: Add drmIsMaster()" Cc: Christopher James Halse Rogers Cc: Emil Velikov Signed-off-by: Eric Engestrom Reviewed-by: Emil Velikov --- xf86drm.c | 2 +- xf86drm.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xf86drm.c b/xf86drm.c index 54695fcd5d1967574b00..05331c6d15bdd15b4be5 100644 --- a/xf86drm.c +++ b/xf86drm.c @@ -2724,7 +2724,7 @@ drm_public int drmDropMaster(int fd) return drmIoctl(fd, DRM_IOCTL_DROP_MASTER, NULL); } -drm_public bool drmIsMaster(int fd) +drm_public int drmIsMaster(int fd) { /* Detect master by attempting something that requires master. * diff --git a/xf86drm.h b/xf86drm.h index b31ec9b5673a717bd6f3..9666a12c36bf28996157 100644 --- a/xf86drm.h +++ b/xf86drm.h @@ -746,7 +746,7 @@ extern void drmMsg(const char *format, ...) DRM_PRINTFLIKE(1, 2); extern int drmSetMaster(int fd); extern int drmDropMaster(int fd); -extern bool drmIsMaster(int fd); +extern int drmIsMaster(int fd); #define DRM_EVENT_CONTEXT_VERSION 4