usr/src/cmd/dosbox/Patches/dosbox-01-socket.diff
author Cyril Plisko <cyril.plisko@grigale.com>
Wed, 21 Oct 2009 17:43:30 +0200
changeset 0 b34509ac961f
child 19 2551d5e2ae4a
permissions -rw-r--r--
Import sfw repo b126

--- dosbox-0.73/configure.in.orig	2009-06-02 15:13:21.301795000 +0530
+++ dosbox-0.73/configure.in	2009-06-02 15:18:22.675005000 +0530
@@ -430,6 +430,11 @@
   AC_MSG_WARN([Can't find libSDL_sound, libSDL_sound support disabled])
 fi
 
+dnl Check for -lsocket -lnsl
+
+AC_CHECK_FUNC(gethostent, , AC_CHECK_LIB(nsl, gethostent))
+AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt))
+
 dnl Check for mprotect. Needed for 64 bits linux 
 AH_TEMPLATE(C_HAVE_MPROTECT,[Define to 1 if you have the mprotect function])
 AC_CHECK_HEADER([sys/mman.h], [
@@ -466,6 +471,9 @@
        LIBS="$LIBS -framework CoreMIDI -framework AudioUnit -framework AudioToolbox"
        AC_DEFINE(C_DIRECTSERIAL, 1, [ Define to 1 if you want serial passthrough support (Win32, Posix and OS/2).])
        ;;
+    *-*-solaris*)
+	AC_DEFINE(C_DIRECTSERIAL, 1, [ Define to 1 if you want serial passthrough support (Win32, Posix and OS/2).])
+	;;
     *-*-linux*)
        AC_DEFINE(LINUX, 1, [Compiling on GNU/Linux])
        AC_DEFINE(C_DIRECTSERIAL, 1, [ Define to 1 if you want serial passthrough support (Win32, Posix and OS/2).])
--- dosbox-0.73/src/hardware/serialport/directserial_posix.cpp.orig	2009-06-02 15:18:43.017182000 +0530
+++ dosbox-0.73/src/hardware/serialport/directserial_posix.cpp	2009-06-02 15:19:17.138361000 +0530
@@ -23,7 +23,7 @@
 #if C_DIRECTSERIAL
 
 // Posix version
-#if defined (LINUX) || defined (MACOSX) || defined (BSD)
+#if defined (LINUX) || defined (MACOSX) || defined (BSD) || defined (_sun)
 
 #include "serialport.h"
 #include "directserial_posix.h"