1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-19 08:13:21 +00:00
freebsd-ports/net/tcpview/files/patch-util.c
Max Khon 03e79f6d24 Fix build on -CURRENT.
Bump port revision.
2003-10-27 20:25:47 +00:00

50 lines
886 B
C

--- util.c.orig Fri Apr 23 04:40:36 1993
+++ util.c Tue Oct 28 01:59:11 2003
@@ -64,7 +64,7 @@
#include <sys/types.h>
#include <sys/time.h>
#include <ctype.h>
-#include <varargs.h>
+#include <stdarg.h>
#include <sys/file.h>
#include <sys/stat.h>
@@ -277,16 +277,13 @@
}
void
-error(va_alist)
- va_dcl
+error(char *cp, ...)
{
- register char *cp;
va_list ap;
(void)fprintf(stderr, "%s: ", stripdir(program_name));
- va_start(ap);
- cp = va_arg(ap, char *);
+ va_start(ap, cp);
(void)vfprintf(stderr, cp, ap);
va_end(ap);
if (*cp) {
@@ -301,16 +298,13 @@
/* VARARGS */
void
-warning(va_alist)
- va_dcl
+warning(char *cp, ...)
{
- register char *cp;
va_list ap;
(void)fprintf(stderr, "%s: warning: ", stripdir(program_name));
- va_start(ap);
- cp = va_arg(ap, char *);
+ va_start(ap, cp);
(void)vfprintf(stderr, cp, ap);
va_end(ap);
if (*cp) {