From ad6af66e58a9e9f081be7c9c9265c9dff15de613 Mon Sep 17 00:00:00 2001 From: John-Mark Gurney Date: Wed, 7 Jan 1998 06:19:50 +0000 Subject: [PATCH] include sys so it builds on 2.2.x also, fix misspelling of -1 (as EOF for getopt) --- usr.bin/truss/Makefile | 2 +- usr.bin/truss/main.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.bin/truss/Makefile b/usr.bin/truss/Makefile index 63172a830eaa..e57704f71298 100644 --- a/usr.bin/truss/Makefile +++ b/usr.bin/truss/Makefile @@ -1,7 +1,7 @@ PROG= truss SRCS= main.c setup.c i386-fbsd.c i386-linux.c \ syscalls.c linux_syscalls.h syscalls.h ioctl.c -CFLAGS+= -I${.CURDIR} -I. +CFLAGS+= -I${.CURDIR} -I. -I${.CURDIR}/../../sys CLEANFILES+=i386l-syscalls.master syscalls.master linux_syscalls.h \ syscalls.h ioctl.c diff --git a/usr.bin/truss/main.c b/usr.bin/truss/main.c index 37608bb636cf..8c020e567445 100644 --- a/usr.bin/truss/main.c +++ b/usr.bin/truss/main.c @@ -31,7 +31,7 @@ #ifndef lint static const char rcsid[] = - "$Id$"; + "$Id: main.c,v 1.7 1998/01/05 07:30:25 charnier Exp $"; #endif /* not lint */ /* @@ -128,7 +128,7 @@ main(int ac, char **av) { int in_exec = 0; char *fname = NULL; - while ((c = getopt(ac, av, "p:o:S")) != EOF) { + while ((c = getopt(ac, av, "p:o:S")) != -1) { switch (c) { case 'p': /* specified pid */ pid = atoi(optarg);