fix up linux compile errors

This commit is contained in:
Kelvin Sherlock 2016-10-30 14:11:15 -04:00
parent 91e7a1e98e
commit 008aafc490

View File

@ -10,6 +10,7 @@
#include <unistd.h> #include <unistd.h>
#include <ctype.h> #include <ctype.h>
#include <string.h> #include <string.h>
#include <time.h>
#include "defc.h" #include "defc.h"
#include "gsos.h" #include "gsos.h"
@ -21,6 +22,11 @@
#include <sys/paths.h> #include <sys/paths.h>
#endif #endif
#ifdef __linux__
#include <sys/xattr.h>
#endif
#ifdef _WIN32 #ifdef _WIN32
#include <io.h> #include <io.h>
@ -151,6 +157,8 @@ static word32 map_errno() {
return pathNotFound; return pathNotFound;
case ENOMEM: case ENOMEM:
return outOfMem; return outOfMem;
case EEXIST:
return dupPathname;
default: default:
return drvrIOError; return drvrIOError;
} }
@ -533,7 +541,7 @@ static word32 set_file_info(const char *path, struct file_info *fi) {
if (i) ok = setattrlist(path, &list, dates, i * sizeof(struct timespec), 0); if (i) ok = setattrlist(path, &list, dates, i * sizeof(struct timespec), 0);
return 0; return 0;
} }
#elif definde _WIN32 #elif defined _WIN32
static void UnixTimeToFileTime(time_t t, LPFILETIME pft) static void UnixTimeToFileTime(time_t t, LPFILETIME pft)