diff --git a/acinclude.m4 b/acinclude.m4 index 937fb5661b..464f356cb7 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -868,6 +868,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*) unsigned int flags]) dnl Check for header files + AC_CHECK_LINUX_HEADER([cred.h]) AC_CHECK_LINUX_HEADER([config.h]) AC_CHECK_LINUX_HEADER([completion.h]) AC_CHECK_LINUX_HEADER([exportfs.h]) diff --git a/src/afs/LINUX/osi_machdep.h b/src/afs/LINUX/osi_machdep.h index 9d3faa9035..9008f7732e 100644 --- a/src/afs/LINUX/osi_machdep.h +++ b/src/afs/LINUX/osi_machdep.h @@ -71,8 +71,10 @@ #define afs_hz HZ #include "h/sched.h" -/* in case cred.h is not included in sched.h */ +/* in case cred.h is present but not included in sched.h */ +#if defined(HAVE_LINUX_CRED_H) #include "h/cred.h" +#endif #if defined(HAVE_LINUX_CURRENT_KERNEL_TIME) static inline time_t osi_Time(void) { struct timespec xtime;