mac: fix for 10.12 having clockid_t
[fio.git] / init.c
diff --git a/init.c b/init.c
index 5ff73859d50d444ed371c33a36c710182aa0bb38..bc17b40213a5bacdcecae2ca89e937ef86d6c8b8 100644 (file)
--- a/init.c
+++ b/init.c
@@ -309,7 +309,7 @@ static void free_shm(void)
        free(trigger_remote_cmd);
        trigger_file = trigger_cmd = trigger_remote_cmd = NULL;
 
-       options_free(fio_options, &def_thread);
+       options_free(fio_options, &def_thread.o);
        fio_filelock_exit();
        scleanup();
 }
@@ -903,26 +903,6 @@ static const char *get_engine_name(const char *str)
        return p;
 }
 
-static int exists_and_not_regfile(const char *filename)
-{
-       struct stat sb;
-
-       if (lstat(filename, &sb) == -1)
-               return 0;
-
-#ifndef WIN32 /* NOT Windows */
-       if (S_ISREG(sb.st_mode))
-               return 0;
-#else
-       /* \\.\ is the device namespace in Windows, where every file
-        * is a device node */
-       if (S_ISREG(sb.st_mode) && strncmp(filename, "\\\\.\\", 4) != 0)
-               return 0;
-#endif
-
-       return 1;
-}
-
 static void init_rand_file_service(struct thread_data *td)
 {
        unsigned long nranges = td->o.nr_files << FIO_FSERVICE_SHIFT;
@@ -1446,6 +1426,12 @@ static int add_job(struct thread_data *td, const char *jobname, int job_add_num,
        }
 
        if (o->hist_log_file) {
+#ifndef CONFIG_ZLIB
+               if (td->client_type) {
+                       log_err("fio: --write_hist_log requires zlib in client/server mode\n");
+                       goto err;
+               }
+#endif
                struct log_params p = {
                        .td = td,
                        .avg_msec = o->log_avg_msec,