diff --git a/ndhc/nl.h b/ndhc/nl.h index 21f47a2..6e54709 100644 --- a/ndhc/nl.h +++ b/ndhc/nl.h @@ -35,7 +35,7 @@ static inline int nlmsg_get_error(const struct nlmsghdr *nlh) { - const struct nlmsgerr *err = NLMSG_DATA(nlh); + const struct nlmsgerr *err = (const struct nlmsgerr *)NLMSG_DATA(nlh); if (nlh->nlmsg_len < sizeof(struct nlmsgerr) + NLMSG_HDRLEN) return EBADMSG; return err->error & 0x7fffffff;