mirror of https://github.com/YosysHQ/yosys.git
libs/fst: Patch <io.h>
I think what's happening here is that the _WIN64 fix is correct for 64bit windows, but (for whatever reason) the visual studio build is targeting 32bit windows, so the fix is unnecessary, but the upstream fix doesn't expect to be targeting 32bit windows and assumes all windows builds are 64bit... so fix that.
This commit is contained in:
parent
1055e8ce51
commit
5f83d4d9da
|
@ -0,0 +1,11 @@
|
||||||
|
--- fst_win_unistd.h
|
||||||
|
+++ fst_win_unistd.h
|
||||||
|
@@ -26,7 +26,7 @@
|
||||||
|
#define WIN_UNISTD_H
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
-#ifdef _WIN64
|
||||||
|
+#if defined(_MSC_VER)
|
||||||
|
#include <io.h>
|
||||||
|
#else
|
||||||
|
#include <sys/io.h>
|
|
@ -16,3 +16,4 @@ sed -i -e 's,<config.h>,"config.h",' *.cc *.h
|
||||||
sed -i -e 's,"fastlz.c","fastlz.cc",' *.cc *.h
|
sed -i -e 's,"fastlz.c","fastlz.cc",' *.cc *.h
|
||||||
|
|
||||||
patch -p0 < 00_PATCH_win_zlib.patch
|
patch -p0 < 00_PATCH_win_zlib.patch
|
||||||
|
patch -p0 < 00_PATCH_win_io.patch
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#define WIN_UNISTD_H
|
#define WIN_UNISTD_H
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#ifdef _WIN64
|
#if defined(_MSC_VER)
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
#else
|
#else
|
||||||
#include <sys/io.h>
|
#include <sys/io.h>
|
||||||
|
|
Loading…
Reference in New Issue