mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
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
This commit is contained in:
parent
758a3ae4bb
commit
b9923df170
3 changed files with 20 additions and 0 deletions
6
utils/imxtools/scsitools/README.win32
Normal file
6
utils/imxtools/scsitools/README.win32
Normal file
|
@ -0,0 +1,6 @@
|
|||
This tool can be compiled under Windows with MinGW and the Windows port of sg3_util.
|
||||
Everything runs unmodified with MSYS except perhaps for
|
||||
- the library in which case you might have to change the LDFLAGS in Makefile to:
|
||||
LDFLAGS=/usr/local/lib/libsgutils2.a
|
||||
- the include directory in which case you might have to change the DEFINES in Makefile to:
|
||||
DEFINES=-I/usr/local/include
|
|
@ -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 "stmp_scsi.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;
|
||||
int g_dev_fd = 0;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue