 +
 +	/* Lightly verify that the device node looks sane */
 +	if (fstat(fd, &st) == -1 || !S_ISCHR(st.st_mode)) {
-+		close(fd);
-+		goto nodevrandom;
-+	}
-+	if (ioctl(fd, RNDGETENTCNT, &cnt) == -1) {
 +		close(fd);
 +		goto nodevrandom;
 +	}

+}
diff -uprN netcat-openbsd-1.130.bk/Makefile netcat-openbsd-1.130/Makefile
--- netcat-openbsd-1.130.bk/Makefile	2017-04-13 23:37:45.291164300 +0800
+++ netcat-openbsd-1.130/Makefile	2017-04-14 00:10:01.268813000 +0800
@@ -1,12 +1,12 @@
 #       $OpenBSD: Makefile,v 1.6 2001/09/02 18:45:41 jakob Exp $
 
 PROG=	nc
-SRCS=	netcat.c atomicio.c socks.c
+SRCS=	netcat.c atomicio.c socks.c arc4random.c readpassphrase.c getentropy_linux.c hash/sha512c.c
 
 PKG_CONFIG ?= pkg-config
-LIBS=  `$(PKG_CONFIG) --libs libbsd` -lresolv

+	errno = EIO;
+	return (-1);
+}
+
+static const int cl[] = {
+	CLOCK_REALTIME,
