From a5611c2dffc58595d686d040b0f12c474a9d02c2 Mon Sep 17 00:00:00 2001 From: Stephan Wiesand Date: Thu, 21 Nov 2013 15:01:29 +0100 Subject: [PATCH] Linux: Fix build for older kernels w/o bool Commit b7f4f2023b2b3e1aac46715176940fb50cc75265 broke builds against older kernels which don't have bool defined in linux/types.h . Fix this by using unsigned char instead of bool for the static inline functions. Reviewed-on: http://gerrit.openafs.org/10483 Tested-by: BuildBot Reviewed-by: Anders Kaseorg Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear (cherry picked from commit 5b67620c7b3ad224ea53075e37ecf1f7e6a7c51a) Change-Id: Iccb8ca2625211b94b105c6eb60764f4a064b345a Reviewed-on: http://gerrit.openafs.org/10518 Reviewed-by: Marc Dionne Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Stephan Wiesand --- src/afs/LINUX/osi_machdep.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/afs/LINUX/osi_machdep.h b/src/afs/LINUX/osi_machdep.h index 06e9c03a7..f13e771f6 100644 --- a/src/afs/LINUX/osi_machdep.h +++ b/src/afs/LINUX/osi_machdep.h @@ -178,10 +178,10 @@ static inline afs_kuid_t afs_make_kuid(uid_t uid) {return uid;} static inline afs_kgid_t afs_make_kgid(gid_t gid) {return gid;} static inline uid_t afs_from_kuid(afs_kuid_t kuid) {return kuid;} static inline gid_t afs_from_kgid(afs_kgid_t kgid) {return kgid;} -static inline bool uid_eq(uid_t a, uid_t b) {return a == b;} -static inline bool gid_eq(gid_t a, gid_t b) {return a == b;} -static inline bool uid_lt(uid_t a, uid_t b) {return a < b;} -static inline bool gid_lt(gid_t a, gid_t b) {return a < b;} +static inline unsigned char uid_eq(uid_t a, uid_t b) {return a == b;} +static inline unsigned char gid_eq(gid_t a, gid_t b) {return a == b;} +static inline unsigned char uid_lt(uid_t a, uid_t b) {return a < b;} +static inline unsigned char gid_lt(gid_t a, gid_t b) {return a < b;} #define GLOBAL_ROOT_UID ((afs_kuid_t) 0) #define GLOBAL_ROOT_GID ((afs_kgid_t) 0) -- 2.39.5