summaryrefslogtreecommitdiffstats
path: root/hunt/hunt
diff options
context:
space:
mode:
Diffstat (limited to 'hunt/hunt')
-rw-r--r--hunt/hunt/Makefile18
-rw-r--r--hunt/hunt/connect.c1
-rw-r--r--hunt/hunt/hunt.c4
-rw-r--r--hunt/hunt/playit.c1
4 files changed, 17 insertions, 7 deletions
diff --git a/hunt/hunt/Makefile b/hunt/hunt/Makefile
index e7584aa1..211b9619 100644
--- a/hunt/hunt/Makefile
+++ b/hunt/hunt/Makefile
@@ -3,12 +3,18 @@
PROG= hunt
SRCS= connect.c hunt.c otto.c playit.c server.c
MAN= hunt.6
-LDADD= -lcurses -lterminfo
-DPADD= ${LIBCURSES} ${LIBTERMINFO}
-HIDEGAME=hidegame
-CPPFLAGS+=-I${.CURDIR}/../include
+all: $(PROG)
-COPTS.hunt.c+= ${GCC_NO_STRINGOP_TRUNCATION}
+$(PROG): $(SRCS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROG) $(SRCS) $(EXTRADEFS) -I../include -lncursesw
+ $(STRIP) $(PROG)
-.include <bsd.prog.mk>
+install: $(PROG) $(MAN)
+ $(GINSTALL) -Dm2755 $(PROG) $(DESTDIR)/usr/games/$(PROG)
+ $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/usr/share/man/man6/$(MAN)
+
+clean:
+ rm -f $(CLEANFILES) $(PROG)
+
+.PHONY: all clean install
diff --git a/hunt/hunt/connect.c b/hunt/hunt/connect.c
index 4c2e2f7e..7bcb2759 100644
--- a/hunt/hunt/connect.c
+++ b/hunt/hunt/connect.c
@@ -39,6 +39,7 @@ __RCSID("$NetBSD: connect.c,v 1.11 2014/03/30 05:30:28 dholland Exp $");
#include <signal.h>
#include <unistd.h>
#include <assert.h>
+#include <sys/_endian.h>
#include "hunt_common.h"
#include "hunt_private.h"
diff --git a/hunt/hunt/hunt.c b/hunt/hunt/hunt.c
index ec993fe0..4d0e89e5 100644
--- a/hunt/hunt/hunt.c
+++ b/hunt/hunt/hunt.c
@@ -48,6 +48,8 @@ __RCSID("$NetBSD: hunt.c,v 1.58 2014/03/30 09:11:50 skrll Exp $");
#include <string.h>
#include <unistd.h>
#include <assert.h>
+#include <sys/_types/_socklen_t.h>
+#include <netdb.h>
#include "hunt_common.h"
#include "pathnames.h"
@@ -189,7 +191,7 @@ main(int ac, char **av)
case 'w':
case 'h':
case 'p':
- wanrx("Need TCP/IP for S, q, w, h, and p options.");
+ warnx("Need TCP/IP for S, q, w, h, and p options.");
break;
#endif
case 'c':
diff --git a/hunt/hunt/playit.c b/hunt/hunt/playit.c
index be0d5a21..a03dcf17 100644
--- a/hunt/hunt/playit.c
+++ b/hunt/hunt/playit.c
@@ -53,6 +53,7 @@ __RCSID("$NetBSD: playit.c,v 1.25 2014/03/30 05:48:35 dholland Exp $");
#define FREAD 1
#endif
+#define INFTIM (-1)
static int nchar_send;
#ifdef OTTO