Since sg is Linux kernel's SCSI subsystem specific interface, it's
better to include required headers in os/os-linux.h which also defines
FIO_HAVE_SGIO, rather than conditionally including them in os/os.h.
Android has FIO_HAVE_SGIO disabled, so no need to do this for Android.
Even if another platform implements sg (compatible) ioctls within
their SCSI driver, there is no guarantee the required kernel header
will be "linux/fs.h", which then fails to compile.
Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
#include <linux/unistd.h>
#include <linux/raw.h>
#include <linux/major.h>
+#include <linux/fs.h>
+#include <scsi/sg.h>
#include "./os-linux-syscall.h"
#include "binject.h"
#endif
#endif
-#ifdef FIO_HAVE_SGIO
-#include <linux/fs.h>
-#include <scsi/sg.h>
-#endif
-
#ifndef CONFIG_STRSEP
#include "../oslib/strsep.h"
#endif