The S_ISSOCK macro is not available on Windows platforms.
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
goto error;
}
+#ifndef WIN32
if (!S_ISSOCK(sb.st_mode)) {
virReportInvalidArg(fd,
_("fd %d must be a socket"),
fd);
goto error;
}
+#endif /* !WIN32 */
virCheckReadOnlyGoto(dom->conn->flags, error);
}
if ((fd = open(p, O_RDWR)) < 0) {
+#ifndef WIN32
if (S_ISSOCK(sb.st_mode)) {
/* Sockets can be opened only if there exists the
* other side that listens. */
continue;
}
+#endif /* !WIN32 */
virReportSystemError(errno,
_("unable to open %s"),