Oops, the system macro for VMS is OPENSSL_SYS_VMS, not VMS
diff --git a/e_os.h b/e_os.h
index 4436495..28bef94 100644
--- a/e_os.h
+++ b/e_os.h
@@ -160,7 +160,7 @@
 #define closesocket(s)		MacSocket_close(s)
 #define readsocket(s,b,n)	MacSocket_recv((s),(b),(n),true)
 #define writesocket(s,b,n)	MacSocket_send((s),(b),(n))
-#elif defined(VMS)
+#elif defined(OPENSSL_SYS_VMS)
 #define get_last_socket_error() errno
 #define clear_socket_error()    errno=0
 #define ioctlsocket(a,b,c)      ioctl(a,b,c)