$OpenBSD: patch-test_lnd_test_c,v 1.1 2012/05/25 01:42:29 lteo Exp $

- OpenBSD does not have net/ethernet.h, use netinet/if_ether.h instead.

- The "read-write filtering (growing trace)" test should be checking the
  res_filters_3 variable for test results.

- Exit with exit code 1 if any tests fail.

--- test/lnd-test.c.orig	Tue Nov 11 06:32:59 2003
+++ test/lnd-test.c	Sat May  5 00:27:29 2012
@@ -28,7 +28,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALI
 
 #include <libnd.h>
 
-#include <net/ethernet.h>
+#include <netinet/if_ether.h>
 #include <netinet/ip.h>
 #include <netinet/udp.h>
 
@@ -721,7 +721,21 @@ main(int argc, char **argv)
   printf("[%s] editing three overlapping areas\n", res_it_areas_3 ? "ok" : "--");
   printf("[%s] read-only filtering\n", res_filters_1 ? "ok" : "--");
   printf("[%s] read-write filtering (shrinking trace)\n", res_filters_2 ? "ok" : "--");
-  printf("[%s] read-write filtering (growing trace)\n", res_filters_2 ? "ok" : "--");
+  printf("[%s] read-write filtering (growing trace)\n", res_filters_3 ? "ok" : "--");
+
+  if (!res_init ||
+    !res_load ||
+    !res_jump_time ||
+    !res_jump ||
+    !res_it_loaded ||
+    !res_it_blocks ||
+    !res_it_areas_1 ||
+    !res_it_areas_2 ||
+    !res_it_areas_3 ||
+    !res_filters_1 ||
+    !res_filters_2 ||
+    !res_filters_3)
+    return 1;
 
   return 0;
 }
