aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: aMule compiling on FreeBSD 5.1 almost perfect [PATCH]  (Read 3197 times)

Lol

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 1
aMule compiling on FreeBSD 5.1 almost perfect [PATCH]
« 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);
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: aMule compiling on FreeBSD 5.1 almost perfect [PATCH]
« Reply #1 on: December 28, 2003, 09:07:35 PM »

Thanks. CVS will be patched for *BSD compilation.
Logged