[PATCH] Get closer to FreeBSD compile
[fio.git] / init.c
diff --git a/init.c b/init.c
index 4531254a65b9edb3784d13a8271ece3a7b6cf89e..d02056cc12b08cd837165ed57ee5679abd6a3421 100644 (file)
--- a/init.c
+++ b/init.c
@@ -884,9 +884,15 @@ int parse_jobs_ini(char *file)
                                continue;
                        }
                        if (!check_strstore(p, "ioscheduler", tmpbuf)) {
+#ifndef FIO_HAVE_IOSCHED_SWITCH
+                               fprintf(stderr, "io scheduler switching not available\n");
+                               ret = 1;
+                               break;
+#else
                                td->ioscheduler = strdup(tmpbuf);
                                fgetpos(f, &off);
                                continue;
+#endif
                        }
 
                        /*