diff options
author | Douglas Gilbert <dgilbert@interlog.com> | 2019-01-11 06:11:25 +0000 |
---|---|---|
committer | Douglas Gilbert <dgilbert@interlog.com> | 2019-01-11 06:11:25 +0000 |
commit | 2433a22138f1b508c2765aa8499456cd6138a200 (patch) | |
tree | cf41a311a4230b908c6c14726bcfeae431bfdb48 /testing/sg_tst_ioctl.c | |
parent | 284fbfc7e0eb7b53b3ab7a9872aa1416685de785 (diff) | |
download | sg3_utils-2433a22138f1b508c2765aa8499456cd6138a200.tar.gz |
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
Diffstat (limited to 'testing/sg_tst_ioctl.c')
-rw-r--r-- | testing/sg_tst_ioctl.c | 14 |
1 files changed, 10 insertions, 4 deletions
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 <sys/socket.h> /* 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) { |