xf86drm: fix return type for drmIsMaster()
PATCH 1/1 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.
--- xf86drm.c | 2 +- xf86drm.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
xf86drm.c +1 -1
@@ -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. *
xf86drm.h +1 -1
@@ -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
Signature · 7 lines
Cheers, Eric _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Hi Eric,
Quoted 9 lines · Eric Engestrom
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.
Don't you need to drop the stdbool.h include for this to fix compilation?
Cheers,
Daniel
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Emil Velikov
Reviewed-byQuoted 7 lines · Daniel Stone
Hi Eric,
Quoted 3 lines · Eric Engestrom
Xserver has struct members named
bool, which means the last commit breaks its build with errors like this:
Quoted 9 lines
Quoted 6 lines
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.
Don't you need to drop the
stdbool.hinclude for this to fix compilation?
Thanks Eric. With Dan's comment
I really wonder if we cannot fix these trivial X nuisances? As-is every project used has to either work around X mistakes :-( Wrt libdrm that is fine, yet other projects might be less happy.
Thanks
-Emil
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 8 lines · Emil Velikov
Quoted 7 lines · Daniel Stone
Hi Eric,
Quoted 3 lines · Eric Engestrom
Xserver has struct members named
bool, which means the last commit breaks its build with errors like this:
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines
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.
Don't you need to drop the
stdbool.hinclude for this to fix compilation?
Ahem... /me looks for his brown paper bag :]
Quoted 7 lines
Quoted 1 line
Thanks Eric. With Dan's comment
Reviewed-by Emil Velikov <[email protected]>I really wonder if we cannot fix these trivial X nuisances? As-is every project used has to either work around X mistakes :-( Wrt libdrm that is fine, yet other projects might be less happy.
Agreed :/
The issue is that you still won't be able to have bools in libdrm, because a new libdrm might be used with an old xserver...
Quoted 3 lines
Thanks
-Emil
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel