Fix mingw64 compilation
Reported by Pierre Muller | August 9th, 2011 @ 10:28 AM | in 1.2.0 (closed)
Compilation for mingw64 fails:
x86_64-w64-mingw32-gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../yasm
-O0 -gstabs+ -Wall -Werror -MT file.o -MD -MP -MF .deps/file.Tpo -c
-o file.o test -f 'liby asm/file.c' || echo
'../yasm/'libyasm/file.c
cc1: warnings being treated as errors
../yasm/libyasm/file.c: In function 'yasm_createpath_common':
../yasm/libyasm/file.c:502:17: error: implicit declaration of
function 'mkdir' make[2]: *** [file.o] Error 1
make[2]: Leaving directory
`/cygdrive/e/cygwin/usr/local/src/yasm/mingw64-build'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/cygdrive/e/cygwin/usr/local/src/yasm/mingw64-build'
Fix is easy:
$ cat fix-mkdir.patch diff --git a/libyasm/file.c
b/libyasm/file.c
index 6b0b5cc..9a73821 100644
--- a/libyasm/file.c +++ b/libyasm/file.c @@ -36,6 +36,8 @@
#ifdef WIN32 #include <io.h> +/* mkdir is declared in direct.h header. */ +#include <direct.h> #endif
#ifdef HAVE_SYS_STAT_H
Could this be inserted in main git source?
Thanks in advance,
Pierre Muller
Comments and changes to this ticket
-

Peter Johnson August 19th, 2011 @ 05:22 PM
- → State changed from new to resolved
(from [a9b943e5dbfdf9b7159b1c53134150a507c0954c]) file.h: Separate conditional inclusion of direct.h.
This fixes builds on mingw64.
Reported by: Pierre Muller
[#235 state:resolved] https://github.com/yasm/yasm/commit/a9b943e5dbfdf9b7159b1c53134150a...
-

Peter Johnson August 27th, 2011 @ 05:04 PM
- → Assigned user set to Peter Johnson
- → Milestone set to 1.2.0
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
The Yasm Modular Assembler Project