Fixes for *BSDs

Replace linux-only eventfd() with pipe() to enable use on *BSDs for alsa.
Add FreeBSD to supported OSes.
This commit is contained in:
Johannes Lundberg 2017-07-13 13:58:01 +02:00
parent e1380e0d57
commit e86ffce712
2 changed files with 55 additions and 32 deletions

View file

@ -76,7 +76,7 @@ extern crate libc;
pub use samples_formats::{SampleFormat, Sample};
#[cfg(all(not(windows), not(target_os = "linux"), not(target_os = "macos")))]
#[cfg(all(not(windows), not(target_os = "linux"), not(target_os = "freebsd"), not(target_os = "macos")))]
use null as cpal_impl;
use std::fmt;
@ -89,7 +89,7 @@ use futures::Poll;
mod null;
mod samples_formats;
#[cfg(target_os = "linux")]
#[cfg(any(target_os = "linux", target_os = "freebsd"))]
#[path="alsa/mod.rs"]
mod cpal_impl;