mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Auto merge of #12728 - upsuper:fix-libc-unused, r=emilio
Remove unused libc dependency for windows in style <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because its a trivial change to remove unused dependency <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12728) <!-- Reviewable:end -->
This commit is contained in:
commit
54b3668431
3 changed files with 6 additions and 5 deletions
|
@ -31,7 +31,6 @@ gecko_bindings = {path = "../../ports/geckolib/gecko_bindings", optional = true}
|
|||
heapsize = {version = "0.3.0", optional = true}
|
||||
heapsize_plugin = {version = "0.1.2", optional = true}
|
||||
lazy_static = "0.2"
|
||||
libc = "0.2"
|
||||
log = "0.3.5"
|
||||
matches = "0.1"
|
||||
num-traits = "0.1.32"
|
||||
|
@ -51,5 +50,8 @@ plugins = {path = "../plugins", optional = true}
|
|||
[target.'cfg(windows)'.dependencies]
|
||||
kernel32-sys = "0.2"
|
||||
|
||||
[target.'cfg(not(windows))'.dependencies]
|
||||
libc = "0.2"
|
||||
|
||||
[build-dependencies]
|
||||
walkdir = "0.1"
|
||||
|
|
|
@ -51,7 +51,6 @@ extern crate gecko_bindings;
|
|||
#[allow(unused_extern_crates)]
|
||||
#[macro_use]
|
||||
extern crate lazy_static;
|
||||
extern crate libc;
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
#[allow(unused_extern_crates)]
|
||||
|
|
|
@ -11,10 +11,10 @@
|
|||
|
||||
#[cfg(windows)]
|
||||
extern crate kernel32;
|
||||
#[cfg(not(windows))]
|
||||
extern crate libc;
|
||||
|
||||
use deque::{self, Abort, Data, Empty, Stealer, Worker};
|
||||
#[cfg(not(windows))]
|
||||
use libc::usleep;
|
||||
use rand::{Rng, XorShiftRng, weak_rng};
|
||||
use std::sync::atomic::{AtomicUsize, Ordering};
|
||||
use std::sync::mpsc::{Receiver, Sender, channel};
|
||||
|
@ -90,7 +90,7 @@ const BACKOFFS_UNTIL_CONTROL_CHECK: u32 = 6;
|
|||
#[cfg(not(windows))]
|
||||
fn sleep_microseconds(usec: u32) {
|
||||
unsafe {
|
||||
usleep(usec);
|
||||
libc::usleep(usec);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue