From 2ca153f1f83936cbc63d830e6f35310b0dffa2b9 Mon Sep 17 00:00:00 2001 From: Dagen Brock Date: Sun, 30 Oct 2016 12:39:26 -0500 Subject: [PATCH] attempt to enable host fst on linux --- src/host_fst.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/host_fst.c b/src/host_fst.c index 9bd14d8..c64028b 100644 --- a/src/host_fst.c +++ b/src/host_fst.c @@ -15,7 +15,7 @@ #include "gsos.h" #include "fst.h" -#ifdef __APPLE__ +#if defined(__APPLE__) || defined(__linux__) #include #include #include @@ -352,7 +352,7 @@ static int file_type_to_finder_info(byte *buffer, word16 file_type, word32 aux_t } -#if defined __APPLE__ +#if defined(__APPLE__) || defined(__linux__) static void get_file_xinfo(const char *path, struct file_info *fi) { ssize_t tmp; @@ -451,7 +451,7 @@ static word32 get_file_info(const char *path, struct file_info *fi) { fi->create_date = st.st_ctime; fi->modified_date = st.st_mtime; -#if defined __APPLE__ +#if defined(__APPLE__) || defined(__linux__) fi->create_date = st.st_birthtime; #endif @@ -497,7 +497,7 @@ static word32 get_file_info(const char *path, struct file_info *fi) { -#if defined __APPLE__ +#if defined(__APPLE__) || defined(__linux__) static word32 set_file_info(const char *path, struct file_info *fi) { int ok; @@ -533,7 +533,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); return 0; } -#elif definde _WIN32 +#elif defined _WIN32 static void UnixTimeToFileTime(time_t t, LPFILETIME pft) @@ -1315,7 +1315,7 @@ static int open_data_fork(const char *path, word16 *access, word16 *error) { } return fd; } -#if defined __APPLE__ +#if defined(__APPLE__) || defined(__linux__) static int open_resource_fork(const char *path, word16 *access, word16 *error) { // os x / hfs/apfs don't need to specifically create a resource fork. // or do they?