pkgsrc/benchmarks/postal/patches/patch-ab
rillig e604b5e205 Added two patches that comment out the sa_sigaction field of struct
sigaction for NetBSD versions (<2.0) that don't have it. Approved by wiz.
2005-03-14 15:02:14 +00:00

30 lines
758 B
Text

$NetBSD: patch-ab,v 1.1 2005/03/14 15:02:14 rillig Exp $
--- rabid.cpp.orig Tue Jan 14 12:33:02 2003
+++ rabid.cpp Sat Mar 12 00:25:56 2005
@@ -11,6 +11,15 @@
#include "postal.h"
#include "logit.h"
+#ifdef __NetBSD__
+# include <sys/param.h>
+# if __NetBSD_Version__ >= 200000000
+# define HAVE_STRUCT_SIGACTION_SA_SIGACTION
+# endif
+#else
+# define HAVE_STRUCT_SIGACTION_SA_SIGACTION
+#endif
+
void usage()
{
printf("Usage: rabid [-r max-connections-per-minute] [-p processes] [-l local-address]\n"
@@ -112,7 +121,9 @@ int main(int argc, char **argv)
struct sigaction sa;
sa.sa_handler = SIG_IGN;
+#ifdef HAVE_STRUCT_SIGACTION_SA_SIGACTION
sa.sa_sigaction = NULL;
+#endif
sa.sa_flags = 0;
if(sigaction(SIGPIPE, &sa, NULL))
{