/* Query the EGD <URL: http://www.lothar.com/tech/crypto/>.
*/
-#if defined(WIN32) || defined(VMS)
+#if defined(WIN32) || defined(VMS) || defined(__VMS)
int RAND_egd(const char *path)
{
return(-1);
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
+#include <string.h>
#ifndef offsetof
# define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
buf[1] = 255;
write(fd, buf, 2);
if (read(fd, buf, 1) != 1) goto err;
+ if (buf[0] == 0) goto err;
num = read(fd, buf, 255);
if (num < 1) goto err;
RAND_seed(buf, num);