aMule Forum
English => en_Bugs => Topic started by: Lol on December 26, 2003, 06:26:24 PM
-
aMule compiles great on FreeBSD 5.1.
I only had to
add #include in one place, and
change MSG_NOSIGNAL to SO_NOSIGPIPE
(from sys/socket.h:
#define SO_NOSIGPIPE 0x0800 /* no SIGPIPE from EPIPE */)
my changes:
--- aMule-1.2.1/src/SysTray.h Tue Nov 4 19:39:20 2003
+++ aMule-1.2.1.works/src/SysTray.h Fri Dec 26 16:20:16 2003
@@ -27,6 +27,7 @@
#include
#include
#include
+#include
#include
#include
#include
--- aMule-1.2.1/src/gsocket.c Wed Nov 26 18:48:18 2003
+++ aMule-1.2.1.works/src/gsocket.c Fri Dec 26 18:02:24 2003
@@ -38,6 +38,7 @@
#endif
#include
+#include
#include
#include
#include
@@ -1175,7 +1176,7 @@
{
int ret;
- ret = send(socket->m_fd, buffer, size, MSG_NOSIGNAL);
+ ret = send(socket->m_fd, buffer, size, SO_NOSIGPIPE );
return ret;
}
@@ -1199,7 +1200,7 @@
return -1;
}
- ret = sendto(socket->m_fd, buffer, size, MSG_NOSIGNAL, addr, len);
+ ret = sendto(socket->m_fd, buffer, size, SO_NOSIGPIPE , addr, len);
/* Frees memory allocated from _GAddress_translate_to */
free(addr);
-
Thanks. CVS will be patched for *BSD compilation.