From 9a2d2a69909ceba0de0d56c382ece451c5354047 Mon Sep 17 00:00:00 2001 From: Pavel Emelyanov Date: Wed, 25 Apr 2012 21:36:43 +0400 Subject: [PATCH] fown: Fix compilation for older distros Some of them (FC12 I debug on) doesn't have fown_ex stuff in their libc. Add the missing declarations. Signed-off-by: Pavel Emelyanov --- include/types.h | 12 ++++++++++++ rbtree.c | 1 + 2 files changed, 13 insertions(+) diff --git a/include/types.h b/include/types.h index 36d5a8f18..ef2a2ef8b 100644 --- a/include/types.h +++ b/include/types.h @@ -204,4 +204,16 @@ enum kcmp_type { # define SCM_MAX_FD 253 #endif +#include + +#ifndef F_SETOWN_EX +#define F_SETOWN_EX 15 +#define F_GETOWN_EX 16 + +struct f_owner_ex { + int type; + pid_t pid; +}; +#endif + #endif /* CR_TYPES_H_ */ diff --git a/rbtree.c b/rbtree.c index 5a60757b1..df6d6f090 100644 --- a/rbtree.c +++ b/rbtree.c @@ -2,6 +2,7 @@ * RBtree implementation adopted from the Linux kernel sources. */ +#include #include "rbtree.h" static void __rb_rotate_left(struct rb_node *node, struct rb_root *root)