From 9125f8f5bdb36bfbd2d816d30b6b29b9f89ae3d8 Mon Sep 17 00:00:00 2001 From: Giuseppe Di Natale Date: Mon, 9 Apr 2018 17:20:06 -0700 Subject: [PATCH] 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 Reviewed-by: George Melikov Signed-off-by: Giuseppe Di Natale Closes #697 --- include/sys/sunldi.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/sys/sunldi.h b/include/sys/sunldi.h index 43462ef..a5045f8 100644 --- a/include/sys/sunldi.h +++ b/include/sys/sunldi.h @@ -32,6 +32,12 @@ #include #include +/* + * 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 */ -- 2.39.5