summaryrefslogtreecommitdiff
path: root/ioctl.c
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@altlinux.org>2014-02-25 23:04:55 +0000
committerDmitry V. Levin <ldv@altlinux.org>2014-02-25 23:15:20 +0000
commitfdb896e577d4154b4dbd4350c9828e7df3b7da84 (patch)
tree1890a4a9eacf4212ff7031ff96d4f1f72a87ebae /ioctl.c
parenta7c6e5143cef6d0b62e8812b8dee13f22e31d5db (diff)
downloadstrace-fdb896e577d4154b4dbd4350c9828e7df3b7da84.tar.gz
strace-fdb896e577d4154b4dbd4350c9828e7df3b7da84.tar.bz2
strace-fdb896e577d4154b4dbd4350c9828e7df3b7da84.tar.xz
Do not compile scsi ioctl decoding if <scsi/sg.h> is not available
Add a generic test for <scsi/sg.h> availability to fix build with Bionic libc that does not provide <scsi/sg.h>. * configure.ac (AC_CHECK_HEADERS): Add scsi/sg.h. * ioctl.c (ioctl_decode): Do not call scsi_ioctl if !HAVE_SCSI_SG_H. * scsi.c: Do not compile scsi ioctl decoding if !HAVE_SCSI_SG_H. Reported-by: Elliott Hughes <enh@google.com>
Diffstat (limited to 'ioctl.c')
-rw-r--r--ioctl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ioctl.c b/ioctl.c
index e9a503d..3f6c410 100644
--- a/ioctl.c
+++ b/ioctl.c
@@ -86,8 +86,10 @@ ioctl_decode(struct tcb *tcp, long code, long arg)
case 0x03:
case 0x12:
return block_ioctl(tcp, code, arg);
+#ifdef HAVE_SCSI_SG_H
case 0x22:
return scsi_ioctl(tcp, code, arg);
+#endif
case 'L':
return loop_ioctl(tcp, code, arg);
case 'M':