summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-10-12 18:43:31 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-10-12 18:43:31 +0200
commit3de024ab52f1652b9d104d18355aaab0d7655d7c (patch)
tree152892766aa4f9e976328e1286da63b543bc4cc7 /src
parentMakefile update (diff)
download42-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')
-rw-r--r--src/b_sqb_file.c6
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);
}