Fixed Windows compile errors.

This commit is contained in:
Pieter Hulshoff 2016-05-14 08:20:46 +02:00
parent 11c04d6fbc
commit 1061205d4f
2 changed files with 8 additions and 4 deletions

View File

@ -22,10 +22,14 @@
#include <fstream>
#include <algorithm>
#include <exception>
#ifdef __linux
#include <sys/stat.h>
#include <sys/types.h>
#ifdef _WIN32
#include <Windows.h>
#endif
#ifdef __linux
#include <errno.h>
#include <cstring>
#endif
@ -95,7 +99,7 @@ bool CollectionInfo::Save()
if ( stat( dir.c_str(), &info ) != 0 )
{
#if defined(_WIN32) && !defined(__GNUC__)
if(!CreateDirectory(dir, NULL))
if(!CreateDirectory(dir.c_str(), NULL))
{
if(ERROR_ALREADY_EXISTS != GetLastError())
{

View File

@ -32,7 +32,7 @@ static bool StartLogging();
int main(int argc, char **argv)
{
// Initialize random seed
srand( time( NULL ) );
srand(static_cast<unsigned int>(time(0)));
Configuration::initialize();