diff --git a/src/ca/iocinf.cpp b/src/ca/iocinf.cpp index 088eb4279..0e49f4e8a 100644 --- a/src/ca/iocinf.cpp +++ b/src/ca/iocinf.cpp @@ -16,6 +16,7 @@ #include #include #include +#include #include "envDefs.h" #include "epicsAssert.h" @@ -108,9 +109,11 @@ extern "C" void epicsShareAPI addAddrToChannelAccessAddressList extern "C" void epicsShareAPI removeDuplicatesAddresses ( ELLLIST *pDestList, ELLLIST *pSrcList ) { - osiSockAddrNode *pNode; + ELLNODE *pRawNode; - while ( (pNode = (osiSockAddrNode *) ellGet ( pSrcList ) ) ) { + while ( (pRawNode = ellGet ( pSrcList ) ) ) { + assert ( offsetof (osiSockAddrNode, node) == 0 ); + osiSockAddrNode *pNode = reinterpret_cast ( pRawNode ); osiSockAddrNode *pTmpNode; if ( pNode->addr.sa.sa_family == AF_INET ) {