]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Linux: Fix build for older kernels w/o bool
authorStephan Wiesand <stephan.wiesand@desy.de>
Thu, 21 Nov 2013 14:01:29 +0000 (15:01 +0100)
committerStephan Wiesand <stephan.wiesand@desy.de>
Fri, 6 Dec 2013 14:41:45 +0000 (06:41 -0800)
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 <buildbot@rampaginggeek.com>
Reviewed-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit 5b67620c7b3ad224ea53075e37ecf1f7e6a7c51a)

Change-Id: Iccb8ca2625211b94b105c6eb60764f4a064b345a
Reviewed-on: http://gerrit.openafs.org/10518
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/afs/LINUX/osi_machdep.h

index 06e9c03a73cc031af9870d50632ba7ff618e2bae..f13e771f659a804cdea259af4799c35bf26e28dd 100644 (file)
@@ -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)