freebsd-ports/irc/ctrlproxy/files/patch-lib_connection.c
Martin Wilke a9089018a7 - Fix socketpair() function invocation
* The socketpair() function is invoked incorrectly causing,
    it to return EPROTONOSUPPORT everytime.
  * Changed '#include <gssapi.h>' to '#include <gssapi/gssapi.h>'
    to prevent warnings emitted by GCC.

PR:		131422
Submitted by:	Ashish Shukla <wahjava@gmail.com> (maintainer)
2009-03-01 23:40:05 +00:00

18 lines
351 B
C

$FreeBSD$
--- lib/connection.c.orig
+++ lib/connection.c
@@ -676,8 +676,12 @@
pid_t pid;
int sock[2];
+#ifdef __FreeBSD__
+ if (socketpair(PF_LOCAL, SOCK_STREAM, 0, sock) == -1) {
+#else
if (socketpair(PF_UNIX, SOCK_STREAM, AF_LOCAL, sock) == -1) {
+#endif
network_log(LOG_ERROR, s, "socketpair: %s", strerror(errno));
return -1;
}