WSAPoll broke Windows XP compatibility

The introduction of WSAPoll in juce_Socket.cpp appears to have broken Windows XP compatibility.

Attempting to launch a binary using the current juce_Socket.cpp under Windows XP results in an error message.

According to the documentation:

The WSAPoll function is defined on Windows Vista and later.

From a comment on stackoverflow:

“[WSAPoll] Cannot be used for applications targeting Windows XP.”

Another comment on stackoverflow:

Actually, the code should be rewritten - period, since WSAPoll() is broken and even Microsoft has gone on record saying that WSAPoll() will not be fixed and should not be used.

It’s referring to a blog post from 2012, so I’m not sure if “WSAPoll will not be fixed” still holds.

Going back to the previous version of juce_Socket.cpp and restore Windows XP compatibility would be trivial, AFAIK nothing depends on its current implementation.

@ed95 What is the reason for this change? Breaking Windows XP support was probably not intentional.

1 Like

Thanks for reporting, the following should fix this:


Thank you for addressing it so fast!

1 Like

Actually, it turns out that the issues with WSAPoll that you linked to above were causing issues with the sockets code in JUCE as detailed here. I’ve removed the calls to WSAPoll completely and we now just use select().