$NetBSD$

Adds MacOS X (Lion) and NetBSD support.

--- src/main.c.orig	2013-10-20 19:54:40.000000000 +0000
+++ src/main.c	2013-10-20 20:04:55.000000000 +0000
@@ -26,8 +26,15 @@
 #include <getopt.h>
 #include <usb.h>
 #include <errno.h>
+#if defined(__APPLE__)
+#include <machine/endian.h>
+#elif defined(__NetBSD__)
+#include <machine/bswap.h>
+#include <sys/endian.h>
+#else
 #include <byteswap.h>
 #include <endian.h>
+#endif
 
 #include "dfu.h"
 #include "usb_dfu.h"
@@ -47,7 +54,7 @@
 #  include <libkern/OSByteOrder.h>
 #  define LE2CPU16(x)	OSSwapInt16(x)
 # else
-#  define LE2CPU16(x)	bswap_16(x)
+#  define LE2CPU16(x)	bswap16(x)
 # endif
 #else
 # define LE2CPU16(x)	(x)
