summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
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);
}