  
  PKG_CONFIG ?= pkg-config
  LIBS=  `$(PKG_CONFIG) --libs libbsd` -lresolv
+diff -uprN netcat-openbsd-1.130.bk/Makefile.orig netcat-openbsd-1.130/Makefile.orig
+--- netcat-openbsd-1.130.bk/Makefile.orig	1970-01-01 08:00:00.000000000 +0800
++++ netcat-openbsd-1.130/Makefile.orig	2016-11-11 09:27:26.000000000 +0800
+@@ -0,0 +1,6 @@
++#	$OpenBSD: Makefile,v 1.6 2001/09/02 18:45:41 jakob Exp $
++
++PROG=	nc
++SRCS=	netcat.c atomicio.c socks.c
++
++.include <bsd.prog.mk>
 diff -uprN netcat-openbsd-1.130.bk/netcat.c netcat-openbsd-1.130/netcat.c
 --- netcat-openbsd-1.130.bk/netcat.c	2017-04-13 23:16:15.278979400 +0800
-+++ netcat-openbsd-1.130/netcat.c	2017-04-13 23:05:00.874553000 +0800
-@@ -97,7 +97,6 @@
++++ netcat-openbsd-1.130/netcat.c	2017-04-13 23:27:16.756833300 +0800
+@@ -96,8 +96,6 @@
+ #include <stdlib.h>
  #include <string.h>
  #include <unistd.h>
- #include <bsd/stdlib.h>
+-#include <bsd/stdlib.h>
 -#include <bsd/string.h>
  #include "atomicio.h"
  
  #ifndef SUN_LEN
-@@ -180,7 +179,9 @@ static int connect_with_timeout(int fd,
+@@ -180,7 +178,9 @@ static int connect_with_timeout(int fd,
          socklen_t salen, int ctimeout);
  
  static void quit();

 int
 main(int argc, char *argv[])
 {
@@ -1616,3 +1617,68 @@ static void quit()
 {
 	exit(0);
 }

diff -uprN netcat-openbsd-1.130.bk/Makefile netcat-openbsd-1.130/Makefile
--- netcat-openbsd-1.130.bk/Makefile	2017-04-13 23:16:15.235448400 +0800
+++ netcat-openbsd-1.130/Makefile	2017-04-13 23:24:53.021349200 +0800
@@ -1,7 +1,7 @@
 #       $OpenBSD: Makefile,v 1.6 2001/09/02 18:45:41 jakob Exp $
 
