summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bfstd.h9
-rw-r--r--src/stat.c7
-rw-r--r--src/xtime.c2
3 files changed, 10 insertions, 8 deletions
diff --git a/src/bfstd.h b/src/bfstd.h
index 9a06ac1..6bf6ec8 100644
--- a/src/bfstd.h
+++ b/src/bfstd.h
@@ -153,6 +153,15 @@ int xmajor(dev_t dev);
*/
int xminor(dev_t dev);
+// #include <sys/stat.h>
+
+#if __APPLE__
+# define st_atim st_atimespec
+# define st_ctim st_ctimespec
+# define st_mtim st_mtimespec
+# define st_birthtim st_birthtimespec
+#endif
+
// #include <unistd.h>
/**
diff --git a/src/stat.c b/src/stat.c
index b59e9b0..94dedef 100644
--- a/src/stat.c
+++ b/src/stat.c
@@ -37,13 +37,6 @@
# define BFS_STATX true
#endif
-#if __APPLE__
-# define st_atim st_atimespec
-# define st_ctim st_ctimespec
-# define st_mtim st_mtimespec
-# define st_birthtim st_birthtimespec
-#endif
-
const char *bfs_stat_field_name(enum bfs_stat_field field) {
switch (field) {
case BFS_STAT_DEV:
diff --git a/src/xtime.c b/src/xtime.c
index 153b267..079d42a 100644
--- a/src/xtime.c
+++ b/src/xtime.c
@@ -236,7 +236,7 @@ int xgetdate(const char *str, struct timespec *result) {
if (!*str) {
goto end;
- } else if (*str == 'T') {
+ } else if (*str == 'T' || *str == ' ') {
++str;
}