diff --git a/CHANGELOG.md b/CHANGELOG.md index 8783afba1..0fac2557a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Unreleased - On Windows, fix `CursorMoved(0, 0)` getting dispatched on window focus. +- On FreeBSD, NetBSD, and OpenBSD, fix build of X11 backend. # Version 0.19.0 (2019-03-06) diff --git a/src/platform/linux/x11/mod.rs b/src/platform/linux/x11/mod.rs index 559629792..0200c7181 100644 --- a/src/platform/linux/x11/mod.rs +++ b/src/platform/linux/x11/mod.rs @@ -19,7 +19,13 @@ use std::collections::HashMap; use std::ffi::CStr; use std::ops::Deref; use std::os::raw::*; -use libc::{select, fd_set, FD_SET, FD_ZERO, FD_ISSET, EINTR, EINVAL, ENOMEM, EBADF, __errno_location}; +use libc::{select, fd_set, FD_SET, FD_ZERO, FD_ISSET, EINTR, EINVAL, ENOMEM, EBADF}; +#[cfg(target_os = "linux")] +use libc::__errno_location; +#[cfg(target_os = "freebsd")] +use libc::__error as __errno_location; +#[cfg(any(target_os = "netbsd", target_os = "openbsd"))] +use libc::__errno as __errno_location; use std::sync::{Arc, mpsc, Weak}; use std::sync::atomic::{self, AtomicBool};