Author: rco
Date: 2008-06-11 14:21:32 +0200 (Wed, 11 Jun 2008)
New Revision: 1015

Modified:
   trunk/core/plug-in/binrpcctrl/libbinrpc/src/Makefile
   trunk/core/plug-in/binrpcctrl/libbinrpc/src/mem.h
   trunk/core/plug-in/binrpcctrl/libbinrpc/src/net.c
Log:
- fixed some porting issues for MacOSX


Modified: trunk/core/plug-in/binrpcctrl/libbinrpc/src/Makefile
===================================================================
--- trunk/core/plug-in/binrpcctrl/libbinrpc/src/Makefile        2008-06-11 
10:53:41 UTC (rev 1014)
+++ trunk/core/plug-in/binrpcctrl/libbinrpc/src/Makefile        2008-06-11 
12:21:32 UTC (rev 1015)
@@ -10,7 +10,7 @@
 all build: dep $(OBJ) $(EXTRA_DEPS)
        $(AR) $(ARFLAGS) $(LIBNAME).a $(OBJ)
 #      $(CC) $(OBJ) $(LDFLAGS) $(LDLIBS) -o $(LIBNAME).so
-       $(LD) $(LDFLAGS) $(LDLIBS) -o $(LIBNAME).so $(OBJ)
+#      $(LD) $(LDFLAGS) $(LDLIBS) -o $(LIBNAME).so $(OBJ)
 
 .PHONY: deps
 dep: $(DEP)

Modified: trunk/core/plug-in/binrpcctrl/libbinrpc/src/mem.h
===================================================================
--- trunk/core/plug-in/binrpcctrl/libbinrpc/src/mem.h   2008-06-11 10:53:41 UTC 
(rev 1014)
+++ trunk/core/plug-in/binrpcctrl/libbinrpc/src/mem.h   2008-06-11 12:21:32 UTC 
(rev 1015)
@@ -24,10 +24,10 @@
 #include <stddef.h>
 
 #ifdef _LIBBINRPC_BUILD
-void *(*brpc_calloc)(size_t nmemb, size_t size);
-void *(*brpc_malloc)(size_t size);
-void (*brpc_free)(void *brpc_ptr);
-void *(*brpc_realloc)(void *ptr, size_t size);
+extern void *(*brpc_calloc)(size_t nmemb, size_t size);
+extern void *(*brpc_malloc)(size_t size);
+extern void (*brpc_free)(void *brpc_ptr);
+extern void *(*brpc_realloc)(void *ptr, size_t size);
 #endif /* _LIBBINRPC_BUILD */
 
 

Modified: trunk/core/plug-in/binrpcctrl/libbinrpc/src/net.c
===================================================================
--- trunk/core/plug-in/binrpcctrl/libbinrpc/src/net.c   2008-06-11 10:53:41 UTC 
(rev 1014)
+++ trunk/core/plug-in/binrpcctrl/libbinrpc/src/net.c   2008-06-11 12:21:32 UTC 
(rev 1015)
@@ -579,8 +579,14 @@
                }
 
                DBG("sending through FD#%d; to send: %zd.\n", sockfd, still);
-               if ((sent = sendto(sockfd, pos, still, 
MSG_DONTWAIT|MSG_NOSIGNAL, 
-                               saddr, saddrlen)) < 0) {
+               if ((sent = sendto(sockfd, pos, still, MSG_DONTWAIT
+#ifdef MSG_NOSIGNAL
+                                  |MSG_NOSIGNAL
+#elseifdef MSG_NOSIGPIPE
+                                  |MSG_NOSIGPIPE
+#endif
+                                  , saddr, saddrlen)) < 0) {
+
                        switch (errno) {
                                /* transient errors */
                                case EAGAIN: /* would block - strange one */
@@ -676,7 +682,14 @@
                                offt, msglen - offt);
 #endif
                if (0 < (rcvd = recvfrom(sockfd, pos, msglen - offt, 
-                               MSG_DONTWAIT|MSG_NOSIGNAL, saddr, addrlen))) {
+                                        MSG_DONTWAIT
+#ifdef MSG_NOSIGNAL
+                                        |MSG_NOSIGNAL
+#elseifdef MSG_NOSIGPIPE
+                                        |MSG_NOSIGPIPE
+#endif
+                                        , saddr, addrlen))) {
+
                        pos += rcvd;
                        offt += rcvd;
 

_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to