Description: Make use of F_SETSIG conditional, linux/serial
 Fixes build on non-linux architectures
Author: Michael Tautschnig <mt@debian.org>

--- lnpd-0.9.0.orig/lnpd+liblnp/liblnp/stub.c
+++ lnpd-0.9.0/lnpd+liblnp/liblnp/stub.c
@@ -379,8 +379,11 @@ lnp_init_result lnp_init ( char *tcp_hos
     if
     (
     	fcntl(socket_fd,F_SETFL,O_ASYNC | O_NONBLOCK) ||
-    	fcntl(socket_fd,F_SETOWN,getpid()) ||
+    	fcntl(socket_fd,F_SETOWN,getpid())
+#ifdef F_SETSIG
+      ||
 	    fcntl(socket_fd,F_SETSIG,SIG_RCV)
+#endif
 	)
 	{
 		lnp_shutdown();
--- lnpd-0.9.0.orig/lnpd+liblnp/lnpd/rcxtty.c
+++ lnpd-0.9.0/lnpd+liblnp/lnpd/rcxtty.c
@@ -12,7 +12,9 @@
 #include <fcntl.h>
 #include <termios.h>
 #include <unistd.h>
+#ifdef __linux__
 #include <linux/serial.h>
+#endif
 #include <sys/ioctl.h>
 #include <stdio.h>
 #include <sys/types.h>
@@ -121,7 +123,9 @@ void tty_exit(void)
 int tty_init(int highspeed,int nolock,const char *device)
 {
 	struct termios ios;
+#ifdef __linux__
     struct serial_struct ttyinfo;
+#endif
 
     // try to create lockfile
     if ( !nolock && make_lockfile(device))
@@ -149,6 +153,7 @@ int tty_init(int highspeed,int nolock,co
   	if (tcsetattr(fd, TCSANOW, &ios) == -1)
     	error_exit("tcsetattr");
     	
+#ifdef __linux__
 	// try to set to "hard realtime mode"
     if  (ioctl(fd,TIOCGSERIAL,&ttyinfo))
     	error_exit("ioctl[TIOCGSERIAL]");
@@ -173,6 +178,7 @@ int tty_init(int highspeed,int nolock,co
 	{
 		log(LNPD_LOG_INFO,"failed to configure tty: %s",strerror(errno));
 	}
+#endif
 	
 	// we must close and reopen the tty
 	close(fd);
