diff mbox series

src/chprojid_fail.c: Fix undefined compile error on old kernel

Message ID 1615975873-19206-1-git-send-email-xuyang2018.jy@cn.fujitsu.com (mailing list archive)
State New, archived
Headers show
Series src/chprojid_fail.c: Fix undefined compile error on old kernel | expand

Commit Message

Yang Xu March 17, 2021, 10:11 a.m. UTC
On old kernel, linux/fs.h doesn't include FS_IOC_FSGETXATTR and FS_IOC_FSGETXATTR
ioctl flag. It also doesn't include fsxattr struct. To fix this error, just
use global.h like fsstress.c.

Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
---
 src/chprojid_fail.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Darrick J. Wong March 18, 2021, 4:22 p.m. UTC | #1
On Wed, Mar 17, 2021 at 06:11:13PM +0800, Yang Xu wrote:
> On old kernel, linux/fs.h doesn't include FS_IOC_FSGETXATTR and FS_IOC_FSGETXATTR
> ioctl flag. It also doesn't include fsxattr struct. To fix this error, just
> use global.h like fsstress.c.
> 
> Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>

Looks good to me, I already had a bug report this morning about this. :/

Reviewed-by: Darrick J. Wong <djwong@kernel.org>

--D

> ---
>  src/chprojid_fail.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/chprojid_fail.c b/src/chprojid_fail.c
> index 8c5b5fee..6d1e0fac 100644
> --- a/src/chprojid_fail.c
> +++ b/src/chprojid_fail.c
> @@ -15,6 +15,7 @@
>  #include <string.h>
>  #include <errno.h>
>  #include <linux/fs.h>
> +#include "global.h"
>  
>  static char zerobuf[65536];
>  
> -- 
> 2.23.0
>
diff mbox series

Patch

diff --git a/src/chprojid_fail.c b/src/chprojid_fail.c
index 8c5b5fee..6d1e0fac 100644
--- a/src/chprojid_fail.c
+++ b/src/chprojid_fail.c
@@ -15,6 +15,7 @@ 
 #include <string.h>
 #include <errno.h>
 #include <linux/fs.h>
+#include "global.h"
 
 static char zerobuf[65536];