Skip to contentSkip to conversation

Allow compat_ioctl.c to compile without CONFIG_NET

PATCH In review Simon Horman 4 participants 4 messages May 10, 2007 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Allow compat_ioctl.c to compile without CONFIG_NET

A small regression appears to have been introduced in the recent patch "cleanup compat ioctl handling", which was included in Linus' tree after 2.6.20.

siocdevprivate_ioctl() is no longer defined if CONFIG_NET is undefined, whereas previously it was a dummy function in this case.

This causes compilation with CONFIG_COMPAT but without CONFIG_NET to fail.

fs/compat_ioctl.c: In function `compat_sys_ioctl':
fs/compat_ioctl.c:3571: warning: implicit declaration of function `siocdevprivate_ioctl'

Cc: Christoph Hellwig <[email protected]>
From: Simon Horman <[email protected]>

fs/compat_ioctl.c +4 -1
Index: linux-2.6/fs/compat_ioctl.c
===================================================================
@@ -3566,10 +3566,13 @@ asmlinkage long compat_sys_ioctl(unsigne
 			goto found_handler;
 	}
 
+#ifdef CONFIG_NET
 	if (S_ISSOCK(filp->f_path.dentry->d_inode->i_mode) &&
 	    cmd >= SIOCDEVPRIVATE && cmd <= (SIOCDEVPRIVATE + 15)) {
 		error = siocdevprivate_ioctl(fd, cmd, arg);
-	} else {
+	} else
+#endif
+	{
 		static int count;
 
 		if (++count <= 50)
Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Simon Horman

A small regression appears to have been introduced in the recent patch "cleanup compat ioctl handling", which was included in Linus' tree after 2.6.20.

siocdevprivate_ioctl() is no longer defined if CONFIG_NET is undefined, whereas previously it was a dummy function in this case.

Quoted 7 lines

This causes compilation with CONFIG_COMPAT but without CONFIG_NET to fail.

fs/compat_ioctl.c: In function `compat_sys_ioctl':
fs/compat_ioctl.c:3571: warning: implicit declaration of function `siocdevprivate_ioctl'

Cc: Christoph Hellwig <[email protected]>
From: Simon Horman <[email protected]>

#2 lore raw
In reply to Simon Horman
Quoted 4 lines · Simon Horman

A small regression appears to have been introduced in the recent patch "cleanup compat ioctl handling", which was included in Linus' tree after 2.6.20.

Quoted 8 lines

siocdevprivate_ioctl() is no longer defined if CONFIG_NET is undefined, whereas previously it was a dummy function in this case.

This causes compilation with CONFIG_COMPAT but without CONFIG_NET to fail.

fs/compat_ioctl.c: In function `compat_sys_ioctl':
fs/compat_ioctl.c:3571: warning: implicit declaration of function `siocdevprivate_ioctl'

Thanks makes sense. I assume Andrew will just pass it on.

-Andi

#3 lore raw
In reply to Simon Horman
Quoted 7 lines · Simon Horman

A small regression appears to have been introduced in the recent patch "cleanup compat ioctl handling", which was included in Linus' tree after 2.6.20.

siocdevprivate_ioctl() is no longer defined if CONFIG_NET is undefined, whereas previously it was a dummy function in this case.

Quoted 7 lines

This causes compilation with CONFIG_COMPAT but without CONFIG_NET to fail.

fs/compat_ioctl.c: In function `compat_sys_ioctl':
fs/compat_ioctl.c:3571: warning: implicit declaration of function `siocdevprivate_ioctl'

Cc: Christoph Hellwig <[email protected]>
From: Simon Horman <[email protected]>

Ok.