diff --git a/include/common.h b/include/common.h index 2fb98e8ad..64958a1ee 100644 --- a/include/common.h +++ b/include/common.h @@ -22,7 +22,7 @@ // needed for *time_r functions under MinGW #ifndef _POSIX_THREAD_SAFE_FUNCTIONS -#define _POSIX_THREAD_SAFE_FUNCTIONS 200112L +#define _POSIX_THREAD_SAFE_FUNCTIONS 200809L #endif // needed for 64-bit off_t on 32-bit OSes @@ -30,6 +30,10 @@ #define _FILE_OFFSET_BITS 64 #endif +#ifndef _FORTIFY_SOURCE +#define _FORTIFY_SOURCE 2 +#endif + #define NOMINMAX 1 #define MIN(a,b) (((a) < (b)) ? (a) : (b)) diff --git a/include/ext_OpenCL.h b/include/ext_OpenCL.h index adaf313f2..beb9bbd0d 100644 --- a/include/ext_OpenCL.h +++ b/include/ext_OpenCL.h @@ -11,21 +11,7 @@ #if defined (__APPLE__) #include -#endif - -#if defined (_WIN) -#include -#endif - -#if defined (__linux__) -#include -#endif - -#if defined (__FreeBSD__) -#include -#endif - -#if defined (__CYGWIN__) +#else #include #endif diff --git a/include/pidfile.h b/include/pidfile.h index 3fa07bcae..e609a5e2b 100644 --- a/include/pidfile.h +++ b/include/pidfile.h @@ -13,9 +13,6 @@ #if defined (_WIN) #include #include -#else -#include -#include #endif // _WIN int pidfile_ctx_init (hashcat_ctx_t *hashcat_ctx); diff --git a/include/restore.h b/include/restore.h index d43e1b14c..740310f5b 100644 --- a/include/restore.h +++ b/include/restore.h @@ -13,9 +13,6 @@ #if defined (_WIN) #include #include -#else -#include -#include #endif // _WIN #define RESTORE_VERSION_MIN 340 diff --git a/src/Makefile b/src/Makefile index 5ffb11d39..1968602f7 100644 --- a/src/Makefile +++ b/src/Makefile @@ -121,7 +121,7 @@ VERSION_TAG := $(shell test -d .git && git describe --tags --dirty=+ ## General compiler and linker options ## -CFLAGS += -pipe -std=c99 -Iinclude/ -Iinclude/lzma_sdk/ -IOpenCL/ +CFLAGS += -pipe -std=gnu99 -Iinclude/ -Iinclude/lzma_sdk/ -IOpenCL/ ifeq ($(PRODUCTION),0) CFLAGS += -W diff --git a/src/dictstat.c b/src/dictstat.c index c30428fe5..47c8f4274 100644 --- a/src/dictstat.c +++ b/src/dictstat.c @@ -16,11 +16,7 @@ int sort_by_dictstat (const void *s1, const void *s2) dictstat_t *d1 = (dictstat_t *) s1; dictstat_t *d2 = (dictstat_t *) s2; - #if defined (__linux__) || defined (__CYGWIN__) - d2->stat.st_atim = d1->stat.st_atim; - #else d2->stat.st_atime = d1->stat.st_atime; - #endif return memcmp (&d1->stat, &d2->stat, sizeof (struct stat)); }