diff --git a/libc-test/test/cmsg.rs b/libc-test/test/cmsg.rs index e7c160062bac2..4028f963155f4 100644 --- a/libc-test/test/cmsg.rs +++ b/libc-test/test/cmsg.rs @@ -2,8 +2,6 @@ //! various inputs. extern crate libc; -use libc::{c_uchar, c_uint, c_void, cmsghdr, msghdr}; -use std::{mem, ptr}; // Run these tests on all Unixen, but skip them on platforms that fail due to // suspected QEMU bugs. Sparc64 gets SIGILL and s390x hangs, both before @@ -11,7 +9,10 @@ use std::{mem, ptr}; #[cfg(all(unix, not(target_arch = "sparc64"), not(target_arch = "s390x")))] -{ +mod cmsg { + +use libc::{c_uchar, c_uint, c_void, cmsghdr, msghdr}; +use std::{mem, ptr}; extern { pub fn cmsg_firsthdr(msgh: *const msghdr) -> *mut cmsghdr;