From 87de027fa430f67bd92153feedfc3fbab54c4c64 Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Tue, 29 Dec 2009 21:56:36 +0000 Subject: [PATCH] Fix ioctl32 inclusion on Sparc 64 ioctl32.h only became available in Linux 2.5.44, so reduce the scope of the include. It went away again, in Linux 2.6.22. In its short life, it only ever provided prototypes for registering translation handlers, and for sys_ioctl. Only include it where we call those handlers, and when we call them, to remove compilation errors for Sparc64. Change-Id: I7816bd8b1e18ead68f7e5078e684d60bf59ac470 Reviewed-on: http://gerrit.openafs.org/1040 Reviewed-by: Russ Allbery Tested-by: Russ Allbery Reviewed-by: Derrick Brashear --- src/afs/LINUX/osi_ioctl.c | 3 ++- src/afs/LINUX/osi_module.c | 3 --- src/afs/LINUX/osi_pag_module.c | 3 --- src/afs/LINUX24/osi_ioctl.c | 3 --- src/afs/LINUX24/osi_pag_module.c | 3 --- 5 files changed, 2 insertions(+), 13 deletions(-) diff --git a/src/afs/LINUX/osi_ioctl.c b/src/afs/LINUX/osi_ioctl.c index cb93b96d0..5f0a86361 100644 --- a/src/afs/LINUX/osi_ioctl.c +++ b/src/afs/LINUX/osi_ioctl.c @@ -24,7 +24,8 @@ #ifdef AFS_AMD64_LINUX20_ENV #include #endif -#ifdef AFS_SPARC64_LINUX20_ENV + +#if defined(AFS_SPARC64_LINUX26_ENV) && defined(NEED_IOCTL32) && !defined(HAVE_COMPAT_IOCTL) #include #endif diff --git a/src/afs/LINUX/osi_module.c b/src/afs/LINUX/osi_module.c index e5a25d9e9..28c563da8 100644 --- a/src/afs/LINUX/osi_module.c +++ b/src/afs/LINUX/osi_module.c @@ -24,9 +24,6 @@ #ifdef AFS_AMD64_LINUX20_ENV #include #endif -#ifdef AFS_SPARC64_LINUX20_ENV -#include -#endif #include #include diff --git a/src/afs/LINUX/osi_pag_module.c b/src/afs/LINUX/osi_pag_module.c index d390b87ce..84dcd3524 100644 --- a/src/afs/LINUX/osi_pag_module.c +++ b/src/afs/LINUX/osi_pag_module.c @@ -23,9 +23,6 @@ #ifdef AFS_AMD64_LINUX20_ENV #include #endif -#ifdef AFS_SPARC64_LINUX20_ENV -#include -#endif #include #include diff --git a/src/afs/LINUX24/osi_ioctl.c b/src/afs/LINUX24/osi_ioctl.c index b29c1adb8..35ed96759 100644 --- a/src/afs/LINUX24/osi_ioctl.c +++ b/src/afs/LINUX24/osi_ioctl.c @@ -24,9 +24,6 @@ #ifdef AFS_AMD64_LINUX20_ENV #include #endif -#ifdef AFS_SPARC64_LINUX20_ENV -#include -#endif #include #include diff --git a/src/afs/LINUX24/osi_pag_module.c b/src/afs/LINUX24/osi_pag_module.c index cf1460d7a..007c78260 100644 --- a/src/afs/LINUX24/osi_pag_module.c +++ b/src/afs/LINUX24/osi_pag_module.c @@ -23,9 +23,6 @@ #ifdef AFS_AMD64_LINUX20_ENV #include #endif -#ifdef AFS_SPARC64_LINUX20_ENV -#include -#endif #include #include -- 2.39.5