From f7c0c066f458e52658199f6ccc66dc0db3b8b3ca Mon Sep 17 00:00:00 2001 From: Mark Vitale Date: Thu, 23 Mar 2017 18:36:44 -0700 Subject: [PATCH] Linux v4.11: cred.h is no longer included in sched.h With Linux commit e26512fea5bcd6602dbf02a551ed073cd4529449, cred.h is no longer included in sched.h. Several components of libafs which require cred.h were picking it by including sched.h. Instead, explicitly add an include for cred.h. cred.h begins with a customary one-shot to prevent multiple loads: #ifndef _LINUX_CRED_H #define _LINUX_CRED_H Therefore we don't need a new autoconf test or preprocessor conditional to prevent redundant includes on older Linux releases. Reviewed-on: https://gerrit.openafs.org/12574 Tested-by: Mark Vitale Tested-by: BuildBot Reviewed-by: Joe Gorse Tested-by: Joe Gorse Reviewed-by: Benjamin Kaduk Reviewed-by: Michael Meffie (cherry picked from commit c89fd17df1032ec2eacc0d0c9b73e19c5e8db7d2) Change-Id: I235a6272c55a8f734be07b578bbb1a324cf34e2e Reviewed-on: https://gerrit.openafs.org/12590 Tested-by: BuildBot Reviewed-by: Mark Vitale Reviewed-by: Stephan Wiesand --- src/afs/LINUX/osi_machdep.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/afs/LINUX/osi_machdep.h b/src/afs/LINUX/osi_machdep.h index 7b457ca603..9d3faa9035 100644 --- a/src/afs/LINUX/osi_machdep.h +++ b/src/afs/LINUX/osi_machdep.h @@ -71,6 +71,8 @@ #define afs_hz HZ #include "h/sched.h" +/* in case cred.h is not included in sched.h */ +#include "h/cred.h" #if defined(HAVE_LINUX_CURRENT_KERNEL_TIME) static inline time_t osi_Time(void) { struct timespec xtime;