From: Eric Engestrom <eric.engestrom@intel.com>
To: dri-devel@lists.freedesktop.org
Cc: Christopher James Halse Rogers
<christopher.halse.rogers@canonical.com>,
Emil Velikov <emil.velikov@collabora.com>
Subject: [PATCH libdrm] xf86drm: fix return type for drmIsMaster()
Date: Fri, 8 Feb 2019 15:02:07 +0000 [thread overview]
Message-ID: <20190208150207.25237-1-eric.engestrom@intel.com> (raw)
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 <christopher.halse.rogers@canonical.com>
Cc: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
---
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
--
Cheers,
Eric
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next reply other threads:[~2019-02-08 15:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-08 15:02 Eric Engestrom [this message]
2019-02-08 16:51 ` [PATCH libdrm] xf86drm: fix return type for drmIsMaster() Daniel Stone
2019-02-08 16:50 ` Emil Velikov
2019-02-08 18:50 ` Eric Engestrom
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190208150207.25237-1-eric.engestrom@intel.com \
--to=eric.engestrom@intel.com \
--cc=christopher.halse.rogers@canonical.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=emil.velikov@collabora.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.