$NetBSD: patch-aa,v 1.1 2005/03/14 15:02:14 rillig Exp $ --- postal.cpp.orig Tue Jan 14 12:33:27 2003 +++ postal.cpp Sat Mar 12 00:24:43 2005 @@ -11,6 +11,15 @@ #include "postal.h" #include "logit.h" +#ifdef __NetBSD__ +# include +# if __NetBSD_Version__ >= 200000000 +# define HAVE_STRUCT_SIGACTION_SA_SIGACTION +# endif +#else +# define HAVE_STRUCT_SIGACTION_SA_SIGACTION +#endif + void usage() { printf("Usage: postal [-m maximum-message-size] [-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)) {