Skip to content

Commit

Permalink
prevent ioctl linking with mingw64 gcc compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
fangq committed Apr 4, 2020
1 parent c986ab7 commit c6c5d55
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions commons/Makefile_common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ else ifeq ($(findstring CYGWIN,$(PLATFORM)), CYGWIN)
MKMEXOPT =-f mexopts_msys2_gcc.xml COMPFLAGS='$$COMPFLAGS $(CCFLAGS) $(USERCCFLAGS)' LDFLAGS='$$LDFLAGS -static $(OPENMPLIB) $(LIBOPENCL) $(MEXLINKOPT)' $(FASTMATH) -outdir ../mmclab
LIBOPENCL ="c:\Windows\System32\OpenCL.dll"
INCLUDEDIRS+=-I"./mingw64/include"
EXTRALIB +=-static
DLLFLAG =
else ifeq ($(findstring Darwin,$(PLATFORM)), Darwin)
INCLUDEDIRS=-I/System/Library/Frameworks/OpenCL.framework/Headers
Expand Down
4 changes: 3 additions & 1 deletion src/mcx_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@
#include <math.h>
#include <ctype.h>
#include <time.h>
#include <sys/ioctl.h>
#ifdef _POSIX_SOURCE
#include <sys/ioctl.h>
#endif
#include "mcx_utils.h"
#include "mcx_const.h"

Expand Down

0 comments on commit c6c5d55

Please sign in to comment.