summaryrefslogtreecommitdiffstats
path: root/utils/nwztools/scsitools
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2013-01-09 22:04:50 +0000
committerAmaury Pouly <amaury.pouly@gmail.com>2013-01-10 00:51:35 +0000
commitb9923df170104320e55bff05ecc2a0105067f9cb (patch)
tree15e28db88edcd033fe70daf7b0d6ae41647cad60 /utils/nwztools/scsitools
parent758a3ae4bb2f9bd02b99f11a9828f172ee2a0328 (diff)
downloadrockbox-b9923df170104320e55bff05ecc2a0105067f9cb.tar.gz
rockbox-b9923df170104320e55bff05ecc2a0105067f9cb.tar.bz2
rockbox-b9923df170104320e55bff05ecc2a0105067f9cb.zip
imxtools/nwztools: fix compilation for windows
There is a windows port of the sg_utils library for scsi pass- through. This little changes make it compile under mingw. A better fix would be to implement direct ioctl on both windows and linux but that's already better than nothing Change-Id: I0d77cd1bad69806a66f0590362f165f24fa240e9
Diffstat (limited to 'utils/nwztools/scsitools')
-rw-r--r--utils/nwztools/scsitools/scsitool.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/utils/nwztools/scsitools/scsitool.c b/utils/nwztools/scsitools/scsitool.c
index ba4a1475bc..7e2dcd9967 100644
--- a/utils/nwztools/scsitools/scsitool.c
+++ b/utils/nwztools/scsitools/scsitool.c
@@ -31,12 +31,19 @@
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
+#ifndef _WIN32
#include <scsi/scsi.h>
+#endif
#include <scsi/sg_lib.h>
#include <scsi/sg_pt.h>
#include "misc.h"
#include "para_noise.h"
+/* the windows port doesn't have scsi.h and GOOD */
+#ifndef GOOD
+#define GOOD 0x00
+#endif
+
bool g_debug = false;
bool g_force = false;
char *g_out_prefix = NULL;