Ticket #7854: libnl-tiny_compile_issue_updated.patch

File libnl-tiny_compile_issue_updated.patch, 2.0 KB (added by anonymous, 6 years ago)

updated patch file, please ignore first version of file

  • libnl-tiny/src/include/netlink/attr.h

    diff -Naur a/libnl-tiny/src/include/netlink/attr.h b/libnl-tiny/src/include/netlink/attr.h
    a b  
    508508static inline int nla_parse_nested(struct nlattr *tb[], int maxtype, struct nlattr *nla, 
    509509                     struct nla_policy *policy) 
    510510{ 
    511         return nla_parse(tb, maxtype, nla_data(nla), nla_len(nla), policy); 
     511        return nla_parse(tb, maxtype, (struct nlattr *)nla_data(nla), nla_len(nla), policy); 
    512512} 
    513513 
    514514/** 
     
    564564static inline size_t nla_strlcpy(char *dst, const struct nlattr *nla, size_t dstsize) 
    565565{ 
    566566        size_t srclen = nla_len(nla); 
    567         char *src = nla_data(nla); 
     567        char *src = (char *)nla_data(nla); 
    568568 
    569569        if (srclen > 0 && src[srclen - 1] == '\0') 
    570570                srclen--; 
  • libnl-tiny/src/include/netlink/handlers.h

    diff -Naur a/libnl-tiny/src/include/netlink/handlers.h b/libnl-tiny/src/include/netlink/handlers.h
    a b  
    172172        int i, err; 
    173173 
    174174        for (i = 0; i <= NL_CB_TYPE_MAX; i++) { 
    175                 err = nl_cb_set(cb, i, kind, func, arg); 
     175                err = nl_cb_set(cb, (enum nl_cb_type)i, kind, func, arg); 
    176176                if (err < 0) 
    177177                        return err; 
    178178        } 
  • libnl-tiny/src/include/netlink/msg.h

    diff -Naur a/libnl-tiny/src/include/netlink/msg.h b/libnl-tiny/src/include/netlink/msg.h
    a b  
    144144 */ 
    145145static inline struct nlattr *nlmsg_attrdata(const struct nlmsghdr *nlh, int hdrlen) 
    146146{ 
    147         unsigned char *data = nlmsg_data(nlh); 
     147        unsigned char *data = (unsigned char *)nlmsg_data(nlh); 
    148148        return (struct nlattr *) (data + NLMSG_ALIGN(hdrlen)); 
    149149} 
    150150 
     
    263263        if (tmp == NULL) 
    264264                return -NLE_NOMEM; 
    265265 
    266         n->nm_nlh = tmp; 
     266        n->nm_nlh = (struct nlmsghdr *)tmp; 
    267267        n->nm_size = newlen; 
    268268 
    269269        return 0;