From fc9abdc179955a30d4c2c6322233bc0281f4a1f4 Mon Sep 17 00:00:00 2001 From: Roy Ivy III Date: Tue, 26 May 2020 13:26:37 -0500 Subject: [PATCH] fix/tail ~ update to correct current WinAPI usage (ref #1496) --- src/uu/tail/Cargo.toml | 3 +-- src/uu/tail/src/platform/windows.rs | 5 +++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/uu/tail/Cargo.toml b/src/uu/tail/Cargo.toml index d45a6e68d..b43a241ad 100644 --- a/src/uu/tail/Cargo.toml +++ b/src/uu/tail/Cargo.toml @@ -16,11 +16,10 @@ path = "src/tail.rs" [dependencies] getopts = "0.2.18" -kernel32-sys = "0.2.2" libc = "0.2.42" uucore = { version="0.0.3", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } uucore_procs = { version="0.0.3", package="uucore_procs", git="https://github.com/uutils/uucore.git", branch="canary" } -winapi = "0.3" +winapi = { version="0.3", features=["fileapi", "handleapi", "processthreadsapi", "synchapi", "winbase"] } [target.'cfg(target_os = "redox")'.dependencies] redox_syscall = "0.1" diff --git a/src/uu/tail/src/platform/windows.rs b/src/uu/tail/src/platform/windows.rs index fbf9351d4..7faa872e6 100644 --- a/src/uu/tail/src/platform/windows.rs +++ b/src/uu/tail/src/platform/windows.rs @@ -7,11 +7,12 @@ * file that was distributed with this source code. */ -extern crate kernel32; extern crate winapi; -use self::kernel32::{CloseHandle, OpenProcess, WaitForSingleObject}; use self::winapi::shared::minwindef::DWORD; +use self::winapi::um::handleapi::CloseHandle; +use self::winapi::um::processthreadsapi::OpenProcess; +use self::winapi::um::synchapi::WaitForSingleObject; use self::winapi::um::winbase::{WAIT_FAILED, WAIT_OBJECT_0}; use self::winapi::um::winnt::{HANDLE, SYNCHRONIZE};