Changeset 51523 in vbox for trunk/src/VBox
- Timestamp:
- Jun 4, 2014 7:58:33 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp
r51503 r51523 1157 1157 while (cbLeft >= sizeof(*pCur)) 1158 1158 { 1159 # if defined(RT_OS_SOLARIS) || defined(RT_OS_LINUX) 1160 /* These two do not provide the sa_len member but only support address 1161 * families which do not need extra bytes on the end. */ 1162 # define SA_LEN(pAddr) sizeof(struct sockaddr) 1163 # elif !defined(SA_LEN) 1164 # define SA_LEN(pAddr) (pAddr)->sa_len 1165 # endif 1159 1166 /* Figure the size of the current request. */ 1160 size_t cbCur = RT_OFFSETOF(struct ifreq, ifr_addr); 1161 # if defined(RT_OS_SOLARIS) || defined(RT_OS_LINUX) /* No sa_len on this platforms. */ 1167 size_t cbCur = RT_OFFSETOF(struct ifreq, ifr_addr) 1168 + SA_LEN(&pCur->ifr_addr); 1169 cbCur = RT_MAX(cbCur, sizeof(struct ifreq)); 1170 # if defined(RT_OS_SOLARIS) || defined(RT_OS_LINUX) 1162 1171 Assert(pCur->ifr_addr.sa_family == AF_INET); 1163 cbCur += sizeof(struct sockaddr);1164 # else1165 cbCur += RT_MAX(sizeof(struct sockaddr), pCur->ifr_addr.sa_len);1166 1172 # endif 1167 1173 AssertBreak(cbCur <= cbLeft);
Note:
See TracChangeset
for help on using the changeset viewer.