drm: Branch 'master'

[email protected] (GitLab Mirror) Fri, 8 Feb 2019 18:53:29 +0000 (UTC)
Newsgroups gmane.comp.video.dri.patches
Message-ID <[email protected]>
 xf86drm.c |    2 +-
 xf86drm.h |    3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

New commits:
commit eba6609b7bee5a56fa5334992b1e6f3aef8d244a
Author: Eric Engestrom <[email protected]>
Date:   Fri Feb 8 14:46:07 2019 +0000

    xf86drm: fix return type for drmIsMaster()
    
    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 <[email protected]>
    Signed-off-by: Eric Engestrom <[email protected]>
    Reviewed-by: Emil Velikov <[email protected]>

diff --git a/xf86drm.c b/xf86drm.c
index ac7af0d6..d006bb38 100644
--- a/xf86drm.c
+++ b/xf86drm.c
@@ -2743,7 +2743,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 9e920db9..887ecc76 100644
--- a/xf86drm.h
+++ b/xf86drm.h
@@ -37,7 +37,6 @@
 #include <stdarg.h>
 #include <sys/types.h>
 #include <stdint.h>
-#include <stdbool.h>
 #include <drm.h>
 
 #if defined(__cplusplus)
@@ -734,7 +733,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
 


--