source: trunk/dports/finance/cgminer/files/patch-c5bfc4523375777e9ad0896204d54fd9ba3634f2.diff @ 105999

Last change on this file since 105999 was 105999, checked in by ram@…, 6 years ago

finance/cgminer: update to 3.1.1

File size: 946 bytes
  • util.c

    From c5bfc4523375777e9ad0896204d54fd9ba3634f2 Mon Sep 17 00:00:00 2001
    From: mhren <mhren@cox.net>
    Date: Sat, 11 May 2013 23:32:57 -0500
    Subject: [PATCH] Update util.c
    
    Apple OS/X does not define MSG_NOSIGNAL.  Use SO_NOSIGPIPE instead
    ---
     util.c | 8 +++++---
     1 file changed, 5 insertions(+), 3 deletions(-)
    
    diff --git a/util.c b/util.c
    index ba98c8a..3e26521 100644
    a b static enum send_ret __stratum_send(struct pool *pool, char *s, ssize_t len) 
    966966                FD_SET(sock, &wd);
    967967                if (select(sock + 1, NULL, &wd, NULL, &timeout) < 1)
    968968                        return SEND_SELECTFAIL;
    969 #ifndef WIN32
    970                 sent = send(pool->sock, s + ssent, len, MSG_NOSIGNAL);
    971 #else
     969#ifdef __APPLE__
     970                sent = send(pool->sock, s + ssent, len, SO_NOSIGPIPE);
     971#elif WIN32
    972972                sent = send(pool->sock, s + ssent, len, 0);
     973#else
     974                sent = send(pool->sock, s + ssent, len, MSG_NOSIGNAL);
    973975#endif
    974976                if (sent < 0) {
    975977                        if (!sock_blocks())
Note: See TracBrowser for help on using the repository browser.