[PATCH] Final FreeBSD compile fixups
[fio.git] / init.c
diff --git a/init.c b/init.c
index d02056cc12b08cd837165ed57ee5679abd6a3421..2c6c8204213ffd6030633aeddd52a9e80d3bd559 100644 (file)
--- a/init.c
+++ b/init.c
@@ -256,9 +256,9 @@ int init_random_state(struct thread_data *td)
 
        close(fd);
 
-       srand48_r(seeds[0], &td->bsrange_state);
-       srand48_r(seeds[1], &td->verify_state);
-       srand48_r(seeds[2], &td->rwmix_state);
+       os_random_seed(seeds[0], &td->bsrange_state);
+       os_random_seed(seeds[1], &td->verify_state);
+       os_random_seed(seeds[2], &td->rwmix_state);
 
        if (td->sequential)
                return 0;
@@ -272,7 +272,7 @@ int init_random_state(struct thread_data *td)
        td->num_maps = num_maps;
        memset(td->file_map, 0, num_maps * sizeof(long));
 
-       srand48_r(seeds[3], &td->random_state);
+       os_random_seed(seeds[3], &td->random_state);
        return 0;
 }
 
@@ -667,10 +667,11 @@ int parse_jobs_ini(char *file)
                                fprintf(stderr, "io priorities not available\n");
                                ret = 1;
                                break;
-#endif
+#else
                                td->ioprio |= prioclass << IOPRIO_CLASS_SHIFT;
                                fgetpos(f, &off);
                                continue;
+#endif
                        }
                        if (!check_int(p, "direct", &td->odirect)) {
                                fgetpos(f, &off);