Gets builds working on Windows (VS 2015) (#37)

Def files will be updated after the latest PR with new definitions gets
added.
This commit is contained in:
Thad House
2017-01-02 23:16:35 -08:00
committed by Peter Johnson
parent f225c4773a
commit b91ab0b44f
10 changed files with 212 additions and 302 deletions

View File

@@ -23,6 +23,8 @@
namespace cs {
#ifdef __linux__
static llvm::StringRef GetUsbNameFromFile(int vendor, int product,
llvm::SmallVectorImpl<char>& buf) {
int fd = open("/var/lib/usbutils/usb.ids", O_RDONLY);
@@ -110,8 +112,6 @@ llvm::StringRef GetUsbNameFromId(int vendor, int product,
return os.str();
}
#ifdef __linux__
int CheckedIoctl(int fd, unsigned long req, void* data, const char* name,
const char* file, int line, bool quiet) {
int retval = ioctl(fd, req, data);