Check for <sys/sockio.h> and include it in uxnet.c if we find it. It's
authorben <ben@cda61777-01e9-0310-a592-d414129be87e>
Mon, 25 Apr 2005 18:51:15 +0000 (18:51 +0000)
committerben <ben@cda61777-01e9-0310-a592-d414129be87e>
Mon, 25 Apr 2005 18:51:15 +0000 (18:51 +0000)
necessary on Solaris if we want to use SIOCATMARK.  Using sockatmark() might
be preferable, but despite being notionally standard it's missing on
Solaris 9 and Mac OS X 10.3.9, whereas everyone seems to have SIOCATMARK
somewhere.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5676 cda61777-01e9-0310-a592-d414129be87e

unix/configure.ac
unix/uxnet.c

index 9156356..e1e33ac 100644 (file)
@@ -14,6 +14,8 @@ if test "X$GCC" = Xyes; then
     CFLAGS="$CFLAGS -Wall -Werror"
 fi
 
+AC_CHECK_HEADERS([sys/sockio.h],,,[ ])
+
 AM_PATH_GTK([1.2.0], [all_targets="all-cli all-gtk"], [all_targets="all-cli"])
 AC_SUBST([all_targets])
 
index 31b1292..5d4ace4 100644 (file)
 #include "network.h"
 #include "tree234.h"
 
+/* Solaris needs <sys/sockio.h> for SIOCATMARK. */
+#ifdef HAVE_SYS_SOCKIO_H
+#include <sys/sockio.h>
+#endif
+
 #ifndef X11_UNIX_PATH
 # define X11_UNIX_PATH "/tmp/.X11-unix/X"
 #endif