socket.ioctl is only available on Windows
diff --git a/Lib/socket.py b/Lib/socket.py
index 7ce2869..6b4b743 100644
--- a/Lib/socket.py
+++ b/Lib/socket.py
@@ -141,7 +141,10 @@
'bind', 'connect', 'connect_ex', 'fileno', 'listen',
'getpeername', 'getsockname', 'getsockopt', 'setsockopt',
'sendall', 'setblocking',
- 'settimeout', 'gettimeout', 'shutdown', 'ioctl')
+ 'settimeout', 'gettimeout', 'shutdown')
+
+if os.name == "nt":
+ _socketmethods = _socketmethods + ('ioctl',)
if sys.platform == "riscos":
_socketmethods = _socketmethods + ('sleeptaskw',)