aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'io.c')
-rw-r--r--io.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/io.c b/io.c
index eb8b80c63b..cc91f7b51c 100644
--- a/io.c
+++ b/io.c
@@ -8473,7 +8473,7 @@ do_ioctl(int fd, ioctl_req_t cmd, long narg)
#define DEFULT_IOCTL_NARG_LEN (256)
-#ifdef __linux__
+#if defined(__linux__) && defined(_IOC_SIZE)
static long
linux_iocparm_len(ioctl_req_t cmd)
{
@@ -8506,7 +8506,7 @@ ioctl_narg_len(ioctl_req_t cmd)
#endif
#ifdef IOCPARM_LEN
len = IOCPARM_LEN(cmd); /* on BSDish systems we're safe */
-#elif defined(__linux__)
+#elif defined(__linux__) && defined(_IOC_SIZE)
len = linux_iocparm_len(cmd);
#else
/* otherwise guess at what's safe */