mirror of
https://github.com/digarok/gsplus.git
synced 2024-11-24 06:34:02 +00:00
build for linux host fst
This commit is contained in:
parent
472bf10144
commit
732adb1bb1
@ -15,7 +15,7 @@
|
|||||||
#include "gsos.h"
|
#include "gsos.h"
|
||||||
#include "fst.h"
|
#include "fst.h"
|
||||||
|
|
||||||
#if defined(__APPLE__) || defined(__linux__)
|
#if defined(__APPLE__)
|
||||||
#include <sys/xattr.h>
|
#include <sys/xattr.h>
|
||||||
#include <sys/attr.h>
|
#include <sys/attr.h>
|
||||||
#include <sys/paths.h>
|
#include <sys/paths.h>
|
||||||
@ -28,6 +28,11 @@
|
|||||||
//#define ftruncate(a,b) _chsize(a,b)
|
//#define ftruncate(a,b) _chsize(a,b)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__linux__)
|
||||||
|
#include <time.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifndef XATTR_FINDERINFO_NAME
|
#ifndef XATTR_FINDERINFO_NAME
|
||||||
#define XATTR_FINDERINFO_NAME "com.apple.FinderInfo"
|
#define XATTR_FINDERINFO_NAME "com.apple.FinderInfo"
|
||||||
#endif
|
#endif
|
||||||
@ -452,7 +457,7 @@ static word32 get_file_info(const char *path, struct file_info *fi) {
|
|||||||
fi->create_date = st.st_ctime;
|
fi->create_date = st.st_ctime;
|
||||||
fi->modified_date = st.st_mtime;
|
fi->modified_date = st.st_mtime;
|
||||||
|
|
||||||
#if defined(__APPLE__) || defined(__linux__)
|
#if defined(__APPLE__)
|
||||||
fi->create_date = st.st_birthtime;
|
fi->create_date = st.st_birthtime;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -498,7 +503,7 @@ static word32 get_file_info(const char *path, struct file_info *fi) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
#if defined(__APPLE__) || defined(__linux__)
|
#if defined(__APPLE__)
|
||||||
static word32 set_file_info(const char *path, struct file_info *fi) {
|
static word32 set_file_info(const char *path, struct file_info *fi) {
|
||||||
|
|
||||||
int ok;
|
int ok;
|
||||||
@ -1316,7 +1321,7 @@ static int open_data_fork(const char *path, word16 *access, word16 *error) {
|
|||||||
}
|
}
|
||||||
return fd;
|
return fd;
|
||||||
}
|
}
|
||||||
#if defined(__APPLE__) || defined(__linux__)
|
#if defined(__APPLE__)
|
||||||
static int open_resource_fork(const char *path, word16 *access, word16 *error) {
|
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.
|
// os x / hfs/apfs don't need to specifically create a resource fork.
|
||||||
// or do they?
|
// or do they?
|
||||||
@ -1356,7 +1361,7 @@ static int open_resource_fork(const char *path, word16 *access, word16 *error) {
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
#elif defined(_WIN32) || defined(WIN_SDL)
|
#elif defined(_WIN32) || defined(WIN_SDL) || defined(__linux__)
|
||||||
static int open_resource_fork(const char *path, word16 *access, word16 *error) {
|
static int open_resource_fork(const char *path, word16 *access, word16 *error) {
|
||||||
char *rpath = append_string(path, ":" XATTR_RESOURCEFORK_NAME);
|
char *rpath = append_string(path, ":" XATTR_RESOURCEFORK_NAME);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user