matrix-io / xc3sprog

xc3sprog is a suite of utilities for programming Xilinx FPGAs, CPLDs, and EEPROMs with the Xilinx Parallel Cable and other JTAG adapters under Linux. Used to program the FPGA of the MATRIX Creator/Voice via Raspberry Pi.
Other
119 stars 55 forks source link

O_NONBLOCK and O_SYNC not declared [mingw] #9

Closed FelixVi closed 7 years ago

FelixVi commented 7 years ago

Hi,

probably something simple I am missing here. Getting the following error when trying to compile with mingw:

C:\MinGW\msys\1.0\home\i7\xc3sprog\sysfs.cpp: In member function 'int IOSysFsGPI O::setup_gpio(int, int)': C:\MinGW\msys\1.0\home\i7\xc3sprog\sysfs.cpp:132:31: error: 'O_NONBLOCK' was not declared in this scope int fd = open(buf, O_RDWR | O_NONBLOCK | O_SYNC); ^~~~~~ ~\xc3sprog\sysfs.cpp:132:44: error: 'O_SYNC' was not dec lared in this scope int fd = open(buf, O_RDWR | O_NONBLOCK | O_SYNC); ^~ CMakeFiles\xc3sproglib.dir\build.make:70: recipe for target 'CMakeFiles/xc3sprog lib.dir/sysfs.cpp.obj' failed

O_NONBLOCK and O_SYNC should be defined in fcntl.h - yet my mingw installation does not. Is there an easy workaround for this?

Thanks a lot!

sperumalcse commented 5 years ago

@FelixVi , Can you please explain the closure for this? I am curious about solution!

FelixVi commented 5 years ago

I am not sure why this got closed here.

Either way, I was able to find a version elsewhere that compiled fine and that I am now using on Windows.

Let me know if you can‘t find a version that works - mine is now probably about 1 year old.