From 2433a22138f1b508c2765aa8499456cd6138a200 Mon Sep 17 00:00:00 2001 From: Douglas Gilbert Date: Fri, 11 Jan 2019 06:11:25 +0000 Subject: spc5r20 updates; fixes for FreeBSD 12.0 release git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@804 6180dd3e-e324-4e3e-922d-17de1ae2f315 --- testing/sg_tst_ioctl.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'testing/sg_tst_ioctl.c') diff --git a/testing/sg_tst_ioctl.c b/testing/sg_tst_ioctl.c index 180db0a1..e7127597 100644 --- a/testing/sg_tst_ioctl.c +++ b/testing/sg_tst_ioctl.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018 D. Gilbert + * Copyright (C) 2018-2019 D. Gilbert * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) @@ -23,6 +23,8 @@ #include /* For passing fd_s via Unix sockets */ +#ifndef HAVE_LINUX_SG_V4_HDR + /* Kernel uapi header contain __user decorations on user space pointers * to indicate they are unsafe in the kernel space. However glibc takes * all those __user decorations out from headers in /usr/include/linux . @@ -38,16 +40,20 @@ #include "uapi_sg.h" /* local copy of include/uapi/scsi/sg.h */ +#else +#define __user +#endif /* end of: ifndef HAVE_LINUX_SG_V4_HDR */ + #include "sg_lib.h" #include "sg_io_linux.h" #include "sg_linux_inc.h" #include "sg_pr2serr.h" -/* This program tests ioctl() calls added and modified in version 3.9 and +/* This program tests ioctl() calls added and modified in version 4.0 and * later of the Linux sg driver. */ -static const char * version_str = "Version: 1.01 20181216"; +static const char * version_str = "Version: 1.02 20190106"; #define INQ_REPLY_LEN 96 #define INQ_CMD_LEN 6 @@ -104,7 +110,7 @@ usage(void) " -w write (submit) only then exit\n"); } -/* This function taken from Keith Parkard's blog dated 2101205 */ +/* This function taken from Keith Parkard's blog dated 20121005 */ static ssize_t sock_fd_write(int sock, const void *buf, ssize_t buflen, int fd) { -- cgit v1.2.3