From fad72c0441e8c866a07f0d0e20fb9b5d45f39b16 Mon Sep 17 00:00:00 2001 From: Francesca Frangipane Date: Mon, 2 Jul 2018 11:05:25 -0400 Subject: [PATCH] X11: Fix compilation when c_char==c_uchar (#586) --- CHANGELOG.md | 1 + src/platform/linux/x11/util/format.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ceb8b68..02988b7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ - Added logging through `log`. Logging will become more extensive over time. - On X11 and Windows, the window's DPI factor is guessed before creating the window. This *greatly* cuts back on unsightly auto-resizing that would occur immediately after window creation. +- Fixed X11 backend compilation for environments where `c_char` is unsigned. # Version 0.16.0 (2018-06-25) diff --git a/src/platform/linux/x11/util/format.rs b/src/platform/linux/x11/util/format.rs index 7871472b..1be8b647 100644 --- a/src/platform/linux/x11/util/format.rs +++ b/src/platform/linux/x11/util/format.rs @@ -50,7 +50,7 @@ pub trait Formattable: Debug + Clone + Copy + PartialEq + PartialOrd { } // You might be surprised by the absence of c_int, but not as surprised as X11 would be by the presence of it. -impl Formattable for c_char { const FORMAT: Format = Format::Char; } +impl Formattable for c_schar { const FORMAT: Format = Format::Char; } impl Formattable for c_uchar { const FORMAT: Format = Format::Char; } impl Formattable for c_short { const FORMAT: Format = Format::Short; } impl Formattable for c_ushort { const FORMAT: Format = Format::Short; }