$OpenBSD: patch-minidlna_c,v 1.1.1.1 2012/10/10 10:45:05 sthen Exp $
--- minidlna.c.orig	Tue May  8 01:10:42 2012
+++ minidlna.c	Sat Sep 22 01:29:04 2012
@@ -46,6 +46,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  */
+#include <sys/stat.h>
 #include <stdlib.h>
 #include <unistd.h>
 #include <string.h>
@@ -85,7 +86,9 @@
 #include "daemonize.h"
 #include "upnpevents.h"
 #include "scanner.h"
+#ifdef __linux__
 #include "inotify.h"
+#endif
 #include "log.h"
 #ifdef TIVO_SUPPORT
 #include "tivo_beacon.h"
@@ -960,11 +963,13 @@ main(int argc, char * * argv)
 #endif
 	}
 	signal(SIGCHLD, SIG_IGN);
+#if defined(__linux__)
 	if( sqlite3_threadsafe() && sqlite3_libversion_number() >= 3005001 &&
 	    GETFLAG(INOTIFY_MASK) && pthread_create(&inotify_thread, NULL, start_inotify, NULL) )
 	{
 		DPRINTF(E_FATAL, L_GENERAL, "ERROR: pthread_create() failed for start_inotify.\n");
 	}
+#endif
 
 	for( i = 0; i < n_lan_addr; i++ )
 	{
@@ -972,6 +977,7 @@ main(int argc, char * * argv)
 		        lan_addr[i].str, inet_ntoa(lan_addr[i].mask));
 	}
 
+// freebsd does this:-	sudp = OpenAndConfSSDPReceiveSocket();
 	sudp = OpenAndConfSSDPReceiveSocket(n_lan_addr, lan_addr);
 	if(sudp < 0)
 	{
