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 <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
#ifdef AFS_AMD64_LINUX20_ENV
#include <asm/ia32_unistd.h>
#endif
-#ifdef AFS_SPARC64_LINUX20_ENV
+
+#if defined(AFS_SPARC64_LINUX26_ENV) && defined(NEED_IOCTL32) && !defined(HAVE_COMPAT_IOCTL)
#include <linux/ioctl32.h>
#endif
#ifdef AFS_AMD64_LINUX20_ENV
#include <asm/ia32_unistd.h>
#endif
-#ifdef AFS_SPARC64_LINUX20_ENV
-#include <linux/ioctl32.h>
-#endif
#include <linux/proc_fs.h>
#include <linux/slab.h>
#ifdef AFS_AMD64_LINUX20_ENV
#include <asm/ia32_unistd.h>
#endif
-#ifdef AFS_SPARC64_LINUX20_ENV
-#include <linux/ioctl32.h>
-#endif
#include <linux/proc_fs.h>
#include <linux/slab.h>
#ifdef AFS_AMD64_LINUX20_ENV
#include <asm/ia32_unistd.h>
#endif
-#ifdef AFS_SPARC64_LINUX20_ENV
-#include <linux/ioctl32.h>
-#endif
#include <linux/proc_fs.h>
#include <linux/slab.h>
#ifdef AFS_AMD64_LINUX20_ENV
#include <asm/ia32_unistd.h>
#endif
-#ifdef AFS_SPARC64_LINUX20_ENV
-#include <linux/ioctl32.h>
-#endif
#include <linux/proc_fs.h>
#include <linux/slab.h>