$NetBSD: patch-ab,v 1.3 2026/03/23 10:12:50 nia Exp $

--- xpaste.c.orig	2026-03-23 09:47:44.790167961 +0000
+++ xpaste.c
@@ -10,6 +10,7 @@ static char rcsid[] = "$Id: xpaste.c,v 1
 #endif
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <X11/StringDefs.h>
 #include <X11/Xlib.h>
 #include <X11/Intrinsic.h>
@@ -18,7 +19,7 @@ static char rcsid[] = "$Id: xpaste.c,v 1
 #include <X11/Xaw/AsciiText.h>
 #include <X11/Xaw/Form.h>
 #include <X11/Xaw/Command.h>
-#include <varargs.h>
+#include <stdarg.h>
 #include "patchlevel.h"
 
 #ifndef WIDTHPADDING
@@ -60,6 +61,7 @@ static struct xpaste_res {
 typedef struct xpaste_res *xpres;
 extern char *getenv();
 
+int
 main(argc, argv)
 int argc;
 char *argv[];
@@ -133,6 +135,7 @@ char *argv[];
 
 	XtRealizeWidget(root);
 	XtMainLoop();
+	return 0;
 }
 
 void Xit(w, closure, call_data)
