From e36c1a7476bd86c057bfb756e4ebeaf21e2b0d01 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Sun, 29 Apr 2018 21:59:55 +0000 Subject: [PATCH] xlat: override values of F_SETOWN_EX and F_GETOWN_EX constants Linux kernel commit v2.6.32-rc7~23 has changed values of F_SETOWN_EX and F_GETOWN_EX constants introduced by commit v2.6.32-rc1~96 to fix the conflict with F_GETLK64 and F_SETLK64 constants. Looks like the best way to handle this situation is to pretend that old values of F_SETOWN_EX and F_GETOWN_EX didn't exist. * xlat/fcntlcmds.in (F_SETOWN_EX, F_GETOWN_EX): Undefine. --- xlat/fcntlcmds.in | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/xlat/fcntlcmds.in b/xlat/fcntlcmds.in index 85fe9f04..56032ce3 100644 --- a/xlat/fcntlcmds.in +++ b/xlat/fcntlcmds.in @@ -46,8 +46,27 @@ F_SETSIG 10 F_GETSIG 11 #endif +#ifndef STRACE_WORKAROUND_FOR_F_OWNER_EX +# define STRACE_WORKAROUND_FOR_F_OWNER_EX +/* + * Linux kernel commit v2.6.32-rc7~23 has changed values of F_SETOWN_EX + * and F_GETOWN_EX constants introduced by commit v2.6.32-rc1~96 to fix + * the conflict with F_GETLK64 and F_SETLK64 constants. + * Looks like the best way to handle this situation is to pretend that + * old values of F_SETOWN_EX and F_GETOWN_EX didn't exist. + */ +# if defined F_SETOWN_EX && F_SETOWN_EX != 15 +# warning invalid value of F_SETOWN_EX ignored +# endif +# undef F_SETOWN_EX +# if defined F_GETOWN_EX && F_GETOWN_EX != 16 +# warning invalid value of F_GETOWN_EX ignored +# endif +# undef F_GETOWN_EX +#endif F_SETOWN_EX 15 F_GETOWN_EX 16 + F_GETOWNER_UIDS 17 F_OFD_GETLK 36 F_OFD_SETLK 37 -- 2.40.0