diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-10-12 18:43:31 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-10-12 18:43:31 +0200 |
commit | 3de024ab52f1652b9d104d18355aaab0d7655d7c (patch) | |
tree | 152892766aa4f9e976328e1286da63b543bc4cc7 /src/b_sqb_file.c | |
parent | Makefile update (diff) | |
download | 42-minishell-3de024ab52f1652b9d104d18355aaab0d7655d7c.tar.gz 42-minishell-3de024ab52f1652b9d104d18355aaab0d7655d7c.tar.bz2 42-minishell-3de024ab52f1652b9d104d18355aaab0d7655d7c.tar.xz 42-minishell-3de024ab52f1652b9d104d18355aaab0d7655d7c.tar.zst 42-minishell-3de024ab52f1652b9d104d18355aaab0d7655d7c.zip |
Compatibility update
Diffstat (limited to 'src/b_sqb_file.c')
-rw-r--r-- | src/b_sqb_file.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/b_sqb_file.c b/src/b_sqb_file.c index 0e9f496..b3c726a 100644 --- a/src/b_sqb_file.c +++ b/src/b_sqb_file.c @@ -10,6 +10,8 @@ /* */ /* ************************************************************************** */ +#define _POSIX_C_SOURCE 200112L + #include <sys/types.h> #include <sys/stat.h> #include <libft.h> @@ -69,10 +71,10 @@ static t_bool b_sqb_file_comp_tests(uint8_t id, struct stat sb2) { if (id == B_ID_SQB_NT - && sb1.st_mtim.tv_sec > sb2.st_mtim.tv_sec) + && sb1.st_mtime > sb2.st_mtime) return (TRUE); else if (id == B_ID_SQB_OT - && sb1.st_mtim.tv_sec < sb2.st_mtim.tv_sec) + && sb1.st_mtime < sb2.st_mtime) return (TRUE); return (FALSE); } |