aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'io.c')
-rw-r--r--io.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/io.c b/io.c
index 44530967..dad7c7b9 100644
--- a/io.c
+++ b/io.c
@@ -116,6 +116,10 @@
#define ENFILE EMFILE
#endif
+#if defined(VMS)
+#define closemaybesocket(fd) close(fd)
+#endif
+
#ifdef HAVE_SOCKETS
#ifndef SHUT_RD
@@ -3013,7 +3017,9 @@ iop_finish(IOBUF *iop)
*
* The fcntl call works for Windows, too.
*/
+#if defined(F_GETFL)
if (fcntl(iop->public.fd, F_GETFL) >= 0)
+#endif
(void) close(iop->public.fd);
iop->public.fd = INVALID_HANDLE;
}