summaryrefslogtreecommitdiff
path: root/Lib/test/test_socket.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_socket.py')
-rwxr-xr-xLib/test/test_socket.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
index 64e95ea34b..6e4e4fe4c3 100755
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -49,6 +49,8 @@ except ImportError:
def get_cid():
if fcntl is None:
return None
+ if not hasattr(socket, 'IOCTL_VM_SOCKETS_GET_LOCAL_CID'):
+ return None
try:
with open("/dev/vsock", "rb") as f:
r = fcntl.ioctl(f, socket.IOCTL_VM_SOCKETS_GET_LOCAL_CID, " ")