$OpenBSD: patch-readsmb_c,v 1.2 2014/04/16 11:36:14 sthen Exp $
--- readsmb.c.orig	Wed Apr 16 05:31:22 2014
+++ readsmb.c	Wed Apr 16 05:33:15 2014
@@ -42,18 +42,20 @@ be
  */
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
-#include <asm/signal.h>
-#ifdef __FreeBSD__
+#include <sys/param.h>
+#include <signal.h>
+#ifdef BSD
 #include <sys/socket.h>
-#endif /* __FreeBSD__ */
+#endif /* BSD */
 #ifdef __sun                    /* Solaris 2.x */
 #define u_int32_t uint32_t
 #include <sys/socket.h>
-#endif /* Not FreeBSD, not Solaris.  Our default is Linux */
+#endif /* Not BSD, not Solaris.  Our default is Linux */
 #include <net/if.h>
-#include "pcap.h"
+#include <pcap.h>
 
 #define FILTER_CMD      "src port 139 or dst port 139"
 #define TRUE    (1)
@@ -86,7 +88,7 @@ eth0 */
 int current_pkt_type = 0;
 int neg_prot, pw_offset, sk_offset, user_offset;
 
-void *
+void
 killed (int sig)
 {
   fflush (log);
@@ -330,7 +332,7 @@ num5, num6);
   free (pc6);
   return (lmhash);
 }
-void
+int
 main (int argc, char **argv)
 {
   char *cur_pkt, *next_pkt;
