diff --git a/acinclude.m4 b/acinclude.m4 index 38e6161a53..0d28d44156 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -939,6 +939,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*) AC_CHECK_LINUX_HEADER([semaphore.h]) AC_CHECK_LINUX_HEADER([seq_file.h]) AC_CHECK_LINUX_HEADER([sched/signal.h]) + AC_CHECK_LINUX_HEADER([uaccess.h]) dnl Type existence checks AC_CHECK_LINUX_TYPE([struct vfs_path], [dcache.h]) diff --git a/src/afs/LINUX/osi_machdep.h b/src/afs/LINUX/osi_machdep.h index 9008f7732e..ce8cabf6ee 100644 --- a/src/afs/LINUX/osi_machdep.h +++ b/src/afs/LINUX/osi_machdep.h @@ -123,7 +123,11 @@ wakeup(void *event) #define IsAfsVnode(V) ((V)->i_sb == afs_globalVFS) /* test superblock instead */ #define SetAfsVnode(V) /* unnecessary */ +#if defined(HAVE_LINUX_UACCESS_H) +#include +#else #include +#endif #define copyin(F, T, C) (copy_from_user ((char*)(T), (char*)(F), (C)) > 0 ? EFAULT : 0) static inline long copyinstr(char *from, char *to, int count, int *length) { diff --git a/src/afs/sysincludes.h b/src/afs/sysincludes.h index d0e58a706b..629b3e6f9a 100644 --- a/src/afs/sysincludes.h +++ b/src/afs/sysincludes.h @@ -145,7 +145,11 @@ struct coda_inode_info { struct xfs_inode_info { }; # endif -# include +# if defined(HAVE_LINUX_UACCESS_H) +# include +# else +# include +# endif # include # include # include diff --git a/src/rx/LINUX/rx_knet.c b/src/rx/LINUX/rx_knet.c index 3398b2d322..dea64fb388 100644 --- a/src/rx/LINUX/rx_knet.c +++ b/src/rx/LINUX/rx_knet.c @@ -25,7 +25,11 @@ #include "rx_peer.h" #include "rx_packet.h" #include "rx_internal.h" +#if defined(HAVE_LINUX_UACCESS_H) +#include +#else #include +#endif #ifdef AFS_RXERRQ_ENV #include #include