socket-util: make sure flush_accept() doesn't hang on unexpected EOPNOTSUPP
So apparently there are two reasons why accept() can return EOPNOTSUPP:
because the socket is not a listening stream socket (or similar), or
because the incoming TCP connection for some reason wasn't acceptable to
the host. THe latter should be a transient error, as suggested on
accept(2). The former however should be considered fatal for
flush_accept(). Let's fix this by explicitly checking whether the socket
is a listening socket beforehand.
(cherry picked from commit
f3d75364fbebf2ddb6393e54db5e10b6f6234e14)
Gbp-Pq: Name socket-util-make-sure-flush_accept-doesn-t-hang-on-unexpe.patch