#endif
#ifdef WIN32
#include <winsock.h>
+#include <direct.h>
+#endif
+#if HAVE_UNISTD_H
+#include <unistd.h>
#endif
#include <signal.h>
show_version();
break;
case 'w':
- if (chdir(arg))
+ if (
+#ifdef WIN32
+ _chdir
+#else
+ chdir
+#endif
+ (arg))
{
yaz_log(YLOG_FATAL|YLOG_ERRNO, "chdir %s", arg);
return 1;