-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
16 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* Override macros to avoid casting alignment warning */ | ||
#undef RTM_RTA | ||
#define RTM_RTA(r) (void *)(((char *)(r)) + NLMSG_ALIGN(sizeof(struct rtmsg))) | ||
#undef RTA_NEXT | ||
#define RTA_NEXT(rta, len) \ | ||
((len) -= RTA_ALIGN((rta)->rta_len), \ | ||
(void *)(((char *)(rta)) + RTA_ALIGN((rta)->rta_len))) | ||
#undef NLMSG_NEXT | ||
#define NLMSG_NEXT(nlh, len) \ | ||
((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \ | ||
(void *)(((char *)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len))) | ||
#undef IFA_RTA | ||
#define IFA_RTA(r) \ | ||
((void *)(((char *)(r)) + NLMSG_ALIGN(sizeof(struct ifaddrmsg)))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters