aboutsummaryrefslogtreecommitdiff
path: root/tests/zfs-tests/cmd/readmmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/zfs-tests/cmd/readmmap.c')
-rw-r--r--tests/zfs-tests/cmd/readmmap.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/zfs-tests/cmd/readmmap.c b/tests/zfs-tests/cmd/readmmap.c
index f119e114d71e..a5c8079d0e46 100644
--- a/tests/zfs-tests/cmd/readmmap.c
+++ b/tests/zfs-tests/cmd/readmmap.c
@@ -6,7 +6,7 @@
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
+ * or https://opensource.org/licenses/CDDL-1.0.
* See the License for the specific language governing permissions
* and limitations under the License.
*
@@ -44,6 +44,7 @@
#include <fcntl.h>
#include <errno.h>
#include <sys/mman.h>
+#include <sys/types.h>
#include <time.h>
int
@@ -55,7 +56,7 @@ main(int argc, char **argv)
char *buf = NULL;
char *map = NULL;
int fd = -1, bytes, retval = 0;
- unsigned seed;
+ uint_t seed;
if (argc < 2 || optind == argc) {
(void) fprintf(stderr,
@@ -92,7 +93,7 @@ main(int argc, char **argv)
retval = 1;
goto end;
}
- seed = time(NULL);
+ seed = (uint_t)time(NULL);
srandom(seed);
idx = random() % size;