As discussed on https://github.com/hashcat/hashcat/pull/409
- The Time.Estimated attribute in status display should also show --runtime limit if user set it
- Fix some strict aliasing rule violation on older compilers
- Fix some variable initializers on older compilers
- The Time.Estimated attribute in status display should also show --runtime limit if user set it
- Fix some strict aliasing rule violation on older compilers
- Fix some variable initializers on older compilers
+- Replace DARWIN macro with __APPLE__
#include <sys/ioctl.h>
#endif
#include <sys/ioctl.h>
#endif
#include <termios.h>
#include <sys/ioctl.h>
#include <mach-o/dyld.h>
#include <termios.h>
#include <sys/ioctl.h>
#include <mach-o/dyld.h>
typedef void *NVAPI_LIB;
typedef void *NVML_LIB;
typedef void *XNVCTRL_LIB;
typedef void *NVAPI_LIB;
typedef void *NVML_LIB;
typedef void *XNVCTRL_LIB;
#define __stdcall
#endif
#endif
#define __stdcall
#endif
#endif
#define CL_USE_DEPRECATED_OPENCL_1_2_APIS
#define CL_USE_DEPRECATED_OPENCL_2_0_APIS
#define CL_USE_DEPRECATED_OPENCL_1_2_APIS
#define CL_USE_DEPRECATED_OPENCL_2_0_APIS
#include <OpenCL/cl.h>
#endif
#include <OpenCL/cl.h>
#endif
#define hc_thread_mutex_delete(m) pthread_mutex_destroy (&m)
#endif
#define hc_thread_mutex_delete(m) pthread_mutex_destroy (&m)
#endif
typedef struct cpu_set
{
uint32_t count;
typedef struct cpu_set
{
uint32_t count;
ifeq ($(UNAME),Darwin)
export MACOSX_DEPLOYMENT_TARGET=10.9
ifeq ($(UNAME),Darwin)
export MACOSX_DEPLOYMENT_TARGET=10.9
-CFLAGS_NATIVE := -D_POSIX -DDARWIN
+CFLAGS_NATIVE := -D_POSIX
CFLAGS_NATIVE += $(CFLAGS)
LFLAGS_NATIVE := -lpthread
LFLAGS_NATIVE += $(LDFLAGS)
CFLAGS_NATIVE += $(CFLAGS)
LFLAGS_NATIVE := -lpthread
LFLAGS_NATIVE += $(LDFLAGS)
#ifdef _WIN
ocl->lib = hc_dlopen ("OpenCL");
#ifdef _WIN
ocl->lib = hc_dlopen ("OpenCL");
ocl->lib = hc_dlopen ("/System/Library/Frameworks/OpenCL.framework/OpenCL", RTLD_NOW);
#else
ocl->lib = hc_dlopen ("libOpenCL.so", RTLD_NOW);
ocl->lib = hc_dlopen ("/System/Library/Frameworks/OpenCL.framework/OpenCL", RTLD_NOW);
#else
ocl->lib = hc_dlopen ("libOpenCL.so", RTLD_NOW);
-#if defined(DARWIN) || defined(__FreeBSD__)
+#ifdef __APPLE__
+#include <stdio.h>
+#endif
+
+#ifdef __FreeBSD__
#include <stdio.h>
#endif
#include <stdio.h>
#endif
#include <stdio.h>
#endif
#include <stdio.h>
#endif
-#if defined(DARWIN) || defined(__FreeBSD__)
+#if defined(__APPLE__) || defined(__FreeBSD__)
static struct termios savemodes;
static int havemodes = 0;
static struct termios savemodes;
static int havemodes = 0;
const int len = GetModuleFileName (NULL, exec_path, exec_path_len - 1);
const int len = GetModuleFileName (NULL, exec_path, exec_path_len - 1);
uint size = exec_path_len;
uint size = exec_path_len;
int pthread_setaffinity_np (pthread_t thread, size_t cpu_size, cpu_set_t *cpu_set)
{
int core;
int pthread_setaffinity_np (pthread_t thread, size_t cpu_size, cpu_set_t *cpu_set)
{
int core;
if ((d = opendir (tmp_path)) != NULL)
{
if ((d = opendir (tmp_path)) != NULL)
{
memset (&e, 0, sizeof (e));
memset (&e, 0, sizeof (e));
struct dirent *de = NULL;
if (readdir_r (d, &e, &de) != 0)
struct dirent *de = NULL;
if (readdir_r (d, &e, &de) != 0)
struct dirent *de;
while ((de = readdir (d)) != NULL)
{
struct dirent *de;
while ((de = readdir (d)) != NULL)
{
if ((strcmp (de->d_name, ".") == 0) || (strcmp (de->d_name, "..") == 0)) continue;
int path_size = strlen (tmp_path) + 1 + strlen (de->d_name);
if ((strcmp (de->d_name, ".") == 0) || (strcmp (de->d_name, "..") == 0)) continue;
int path_size = strlen (tmp_path) + 1 + strlen (de->d_name);