aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Johnson <peter@tortall.net>2011-08-19 10:07:34 -0700
committerPeter Johnson <peter@tortall.net>2011-08-19 10:14:14 -0700
commita9b943e5dbfdf9b7159b1c53134150a507c0954c (patch)
treebb55093d94b3abf821ce770430aa4fc052344cbb
parent40da5cb2c74aeea346fdd58a264c0ab6eb1648f8 (diff)
downloadyasm-a9b943e5dbfdf9b7159b1c53134150a507c0954c.tar.gz
file.h: Separate conditional inclusion of direct.h.
This fixes builds on mingw64. Reported by: Pierre Muller [#235 state:resolved]
-rw-r--r--libyasm/file.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libyasm/file.c b/libyasm/file.c
index 6b0b5cc0..53e61bf8 100644
--- a/libyasm/file.c
+++ b/libyasm/file.c
@@ -27,10 +27,12 @@
#include <util.h>
/*@unused@*/ RCSID("$Id$");
-/* Need either unistd.h or direct.h (on Windows) to prototype getcwd() */
-#if defined(HAVE_UNISTD_H)
+/* Need either unistd.h or direct.h to prototype getcwd() and mkdir() */
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#elif defined(HAVE_DIRECT_H)
+#endif
+
+#ifdef HAVE_DIRECT_H
#include <direct.h>
#endif