diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | src/b_sqb_file.c | 6 |
2 files changed, 4 insertions, 4 deletions
@@ -125,8 +125,6 @@ CFLAGS += -Wextra CFLAGS += -Werror CFLAGS += -pedantic #------------------------------------------------------------------------------# -CDEFS = -D_POSIX_C_SOURCE=200112L -#------------------------------------------------------------------------------# LDFLAGS = -L${LFT_DIR} LDFLAGS += -lft #==============================================================================# 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); } |