Changeset b135888 for lib


Ignore:
Timestamp:
07/02/18 18:23:32 (2 years ago)
Author:
Shane Alcock <salcock@…>
Branches:
cachetimestamps, develop, master, ringdecrementfix, ringperformance
Children:
5864acd
Parents:
97d0351
Message:

Fix bad check for recvmmsg after switching to AC_CHECK_DECLS

Two problems:

  1. recvmmsg requires an extra #include, which we have to add specifically.
  2. HAVE_RECVMMSG is no longer the right macro to check; instead we needed HAVE_DECL_RECVMMSG
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_ndag.c

    r32ee9b2 rb135888  
    9494        int bufwaiting;
    9595
    96 #if HAVE_RECVMMSG
     96#if HAVE_DECL_RECVMMSG
    9797        struct mmsghdr mmsgbufs[RECV_BATCH_SIZE];
    9898#else
     
    532532                }
    533533
    534 #if HAVE_RECVMMSG
     534#if HAVE_DECL_RECVMMSG
    535535                for (j = 0; j < RECV_BATCH_SIZE; j++) {
    536536                        if (src.mmsgbufs[j].msg_hdr.msg_iov) {
     
    749749        }
    750750
    751 #if HAVE_RECVMMSG
     751#if HAVE_DECL_RECVMMSG
    752752        for (i = 0; i < RECV_BATCH_SIZE; i++) {
    753753                ssock->mmsgbufs[i].msg_hdr.msg_iov = (struct iovec *)
     
    834834        int i = 1;
    835835
    836 #if HAVE_RECVMMSG
     836#if HAVE_DECL_RECVMMSG
    837837        for (i = 0; i < required; i++) {
    838838                if (i >= RECV_BATCH_SIZE) {
     
    937937        int toret = 0;
    938938
    939 #if HAVE_RECVMMSG
     939#if HAVE_DECL_RECVMMSG
    940940        int i;
    941941#endif
     
    943943        avail = init_receivers(ssock, ssock->bufavail);
    944944
    945 #if HAVE_RECVMMSG
     945#if HAVE_DECL_RECVMMSG
    946946        ret = recvmmsg(ssock->sock, ssock->mmsgbufs, avail,
    947947                        MSG_DONTWAIT, NULL);
     
    985985        ssock->startidle = 0;
    986986
    987 #if HAVE_RECVMMSG
     987#if HAVE_DECL_RECVMMSG
    988988        for (i = 0; i < ret; i++) {
    989989                ndagstat = check_ndag_received(ssock, ssock->nextwriteind,
     
    10341034                }
    10351035
    1036 #if HAVE_RECVMMSG
     1036#if HAVE_DECL_RECVMMSG
    10371037                /* Plenty of full buffers, just use the packets in those */
    10381038                if (rt->sources[i].bufavail < RECV_BATCH_SIZE / 2) {
Note: See TracChangeset for help on using the changeset viewer.