Merge branch 'latency_window' of https://github.com/liu-song-6/fio
[fio.git] / lib / memcpy.c
index 00e65aa7d50a8e915d66935e28633d64bd24c81a..a552134357131e2e2438deb44764fc61b6ec06be 100644 (file)
@@ -1,3 +1,4 @@
+#include <inttypes.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -6,7 +7,7 @@
 #include "rand.h"
 #include "../fio_time.h"
 #include "../gettime.h"
-#include "../fio.h"
+#include "../os/os.h"
 
 #define BUF_SIZE       32 * 1024 * 1024ULL
 
@@ -200,6 +201,9 @@ static int setup_tests(void)
        void *src, *dst;
        int i;
 
+       if (!tests[0].name)
+               return 0;
+
        src = malloc(BUF_SIZE);
        dst = malloc(BUF_SIZE);
        if (!src || !dst) {