Fix "virtio_block_test_util" build on GNU/Linux systems.

libc::ioctl has a "c_ulong" type on native GNU/Linux x86_64 systems,
but a "c_int" type on Fuchsia systems. We can avoid specifying the
type and allow Rust to infer it to allow the tool to build in both
environments.

Change-Id: Iddff2ef4549f6c0bf6c6b1532ca785eb452204d0
diff --git a/src/bin/virtio_block_test_util.rs b/src/bin/virtio_block_test_util.rs
index 59d6964..d1175d4 100644
--- a/src/bin/virtio_block_test_util.rs
+++ b/src/bin/virtio_block_test_util.rs
@@ -3,7 +3,7 @@
 // found in the LICENSE file.
 #![deny(warnings)]
 
-use libc::{self, c_int};
+use libc;
 use std::fs::{self, File, OpenOptions};
 use std::io::{Error, ErrorKind, Read, Seek, SeekFrom, Write};
 use std::os::unix::io::AsRawFd;
@@ -23,7 +23,7 @@
 macro_rules! define_ioctl {
     ($name:ident, $typ:expr, $num:expr, $return_type:ty) => {
         fn $name(file: &File) -> $return_type {
-            let request: c_int = ($typ << TYPE_SHIFT) | ($num & 0xff);
+            let request = ($typ << TYPE_SHIFT) | ($num & 0xff);
             let mut r: $return_type = 0;
             unsafe {
                 libc::ioctl(file.as_raw_fd(), request, &mut r);
@@ -92,7 +92,7 @@
     offset: u64,
     expected: u8,
 ) -> std::io::Result<()> {
-    block_dev.seek(SeekFrom::Start(offset * block_size as u64))?;
+    block_dev.seek(SeekFrom::Start(offset * u64::from(block_size)))?;
     let mut data: Vec<u8> = vec![0; block_size as usize];
     block_dev.read_exact(&mut data)?;
     if !data.iter().all(|&b| b == expected) {
@@ -107,7 +107,7 @@
     offset: u64,
     value: u8,
 ) -> std::io::Result<()> {
-    block_dev.seek(SeekFrom::Start(offset * block_size as u64))?;
+    block_dev.seek(SeekFrom::Start(offset * u64::from(block_size)))?;
     let data: Vec<u8> = vec![value; block_size as usize];
     block_dev.write_all(&data)?;
     block_dev.sync_all()?;