mirror of
https://git.openafs.org/openafs.git
synced 2025-01-31 05:27:44 +00:00
Linux: only include cred.h if it exists
Commit c89fd17df1032ec2eacc0d0c9b73e19c5e8db7d2 introduced an explicit include of linux/cred.h since the latest kernel no longer includes it implicitly in sched.h. Alas, older kernels (like 2.6.18) don't have this file. Add a configure test for the existence of cred.h and only include it if actually present. Change-Id: Ia7e38160492b1e03cdb257e4b2bef4d18c4a28fb Reviewed-on: https://gerrit.openafs.org/12593 Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Tested-by: BuildBot <buildbot@rampaginggeek.com>
This commit is contained in:
parent
c89fd17df1
commit
6b7b4239ab
@ -931,6 +931,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([exportfs.h])
|
||||
AC_CHECK_LINUX_HEADER([freezer.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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user