]> granicus.if.org Git - strace/commitdiff
xlat: override values of F_SETOWN_EX and F_GETOWN_EX constants
authorDmitry V. Levin <ldv@altlinux.org>
Sun, 29 Apr 2018 21:59:55 +0000 (21:59 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Sun, 29 Apr 2018 21:59:55 +0000 (21:59 +0000)
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

index 85fe9f04c4e5244c3a9d1bc6ba01b6be52eb3826..56032ce3a22c49ebe8303ee8feed3d2113f47ed1 100644 (file)
@@ -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