pkgsrc/net/rtorrent/patches/patch-aa
tron 8d87aa23a5 Add two patches taken from "xnet.fi" to fix the build under SunOS 5.11
(and eventually older versions). Problem reported by Tom Hensel in
private e-mail.
2009-04-10 09:06:20 +00:00

17 lines
525 B
Text

$NetBSD: patch-aa,v 1.7 2009/04/10 09:06:21 tron Exp $
--- src/rpc/scgi.cc.orig 2008-05-07 13:19:10.000000000 +0100
+++ src/rpc/scgi.cc 2009-04-10 09:45:10.000000000 +0100
@@ -88,7 +88,12 @@
char buffer[sizeof(sockaddr_un) + filename.size()];
sockaddr_un* sa = reinterpret_cast<sockaddr_un*>(buffer);
+#if defined(sun) || defined(__sun)
+ sa->sun_family = AF_UNIX;
+#else
sa->sun_family = AF_LOCAL;
+#endif
+
std::memcpy(sa->sun_path, filename.c_str(), filename.size() + 1);
if (!get_fd().open_local())