summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiuseppe Di Natale <[email protected]>2018-04-09 17:20:06 -0700
committerBrian Behlendorf <[email protected]>2018-04-09 17:20:06 -0700
commit9125f8f5bdb36bfbd2d816d30b6b29b9f89ae3d8 (patch)
tree97c6bf780102ceca4523a30b454257e488dd756f
parent581bc01a0765eed9ea7dc17132b3943a5efc966d (diff)
Linux compat 4.16: SECTOR_SIZE
As of https://github.com/torvalds/linux/commit/233bde21, SECTOR_SIZE is defined in linux/blkdev.h. Define SECTOR_SIZE in sunldi.h only if it's not already defined. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: George Melikov <[email protected]> Signed-off-by: Giuseppe Di Natale <[email protected]> Closes #697
-rw-r--r--include/sys/sunldi.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/sys/sunldi.h b/include/sys/sunldi.h
index 43462efad..a5045f891 100644
--- a/include/sys/sunldi.h
+++ b/include/sys/sunldi.h
@@ -32,6 +32,12 @@
#include <linux/bio.h>
#include <linux/blkdev.h>
+/*
+ * SECTOR_SIZE can be defined in blkdev.h. See
+ * https://github.com/torvalds/linux/commit/233bde21.
+ */
+#ifndef SECTOR_SIZE
#define SECTOR_SIZE 512
+#endif
#endif /* SPL_SUNLDI_H */