Ignore:
Timestamp:
Dec 20, 2016, 4:07:32 PM (7 years ago)
Author:
Bruno Cornec
Message:

New 3?3 banch for incorporation of latest busybox 1.25. Changing minor version to handle potential incompatibilities.

Location:
branches/3.3
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/3.3/mindi-busybox/networking/libiproute/libnetlink.c

    r3232 r3621  
    7272    struct sockaddr_nl nladdr;
    7373    struct iovec iov[2] = { { &nlh, sizeof(nlh) }, { req, len } };
     74    /* Use designated initializers, struct layout is non-portable */
    7475    struct msghdr msg = {
    75         (void*)&nladdr, sizeof(nladdr),
    76         iov,  2,
    77         NULL, 0,
    78         0
     76        .msg_name = (void*)&nladdr,
     77        .msg_namelen = sizeof(nladdr),
     78        .msg_iov = iov,
     79        .msg_iovlen = 2,
     80        .msg_control = NULL,
     81        .msg_controllen = 0,
     82        .msg_flags = 0
    7983    };
    8084
     
    105109        int status;
    106110        struct nlmsghdr *h;
    107 
     111        /* Use designated initializers, struct layout is non-portable */
    108112        struct msghdr msg = {
    109             (void*)&nladdr, sizeof(nladdr),
    110             &iov, 1,
    111             NULL, 0,
    112             0
     113            .msg_name = (void*)&nladdr,
     114            .msg_namelen = sizeof(nladdr),
     115            .msg_iov = &iov,
     116            .msg_iovlen = 1,
     117            .msg_control = NULL,
     118            .msg_controllen = 0,
     119            .msg_flags = 0
    113120        };
    114121
     
    212219    struct iovec iov = { (void*)n, n->nlmsg_len };
    213220    char   *buf = xmalloc(8*1024); /* avoid big stack buffer */
     221    /* Use designated initializers, struct layout is non-portable */
    214222    struct msghdr msg = {
    215         (void*)&nladdr, sizeof(nladdr),
    216         &iov, 1,
    217         NULL, 0,
    218         0
     223        .msg_name = (void*)&nladdr,
     224        .msg_namelen = sizeof(nladdr),
     225        .msg_iov = &iov,
     226        .msg_iovlen = 1,
     227        .msg_control = NULL,
     228        .msg_controllen = 0,
     229        .msg_flags = 0
    219230    };
    220231
Note: See TracChangeset for help on using the changeset viewer.