From 9ca1a770bcb434f772042dbb65181fa60407f46a Mon Sep 17 00:00:00 2001 From: Aleksandar Fabijanic Date: Fri, 7 Sep 2012 04:31:09 +0000 Subject: [PATCH] SF#3562244: Portability fix for AF_LINK --- CHANGELOG | 5 +++++ Foundation/src/Environment_UNIX.cpp | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 9a41adb50..1eb8e5267 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -35,12 +35,17 @@ Release 1.5.0 (2012-09-??) - fixed SF#3522081: WinRegistryConfiguration unable to read REG_QWORD values - fixed SF#3563626: For Win32 set Up/Running flags on NetworkInterface - fixed SF#3560807: Deprecate setPeerAddress() as this is now done in getifaddrs +- fixed SF#3560776: Fix byte-ordering issues with INADDR_* literals +- fixed SF#3563627: Set IP address on multicast socket from socket family +- fixed SF#3563999: Size BinaryWriter based on buffer's capacity(), not size() + Release 1.4.4p1 (2012-??-??) ============================ - fixed SF# 3558012 Compilation fails when building with -ansi or -std=c++0x - fixed SF# 3563517 Get rid of loss-of-precision warnings on x64 MacOS +- fixed SF#3562244: Portability fix for AF_LINK Release 1.4.4 (2012-09-03) diff --git a/Foundation/src/Environment_UNIX.cpp b/Foundation/src/Environment_UNIX.cpp index 6dc383535..40c0208f5 100644 --- a/Foundation/src/Environment_UNIX.cpp +++ b/Foundation/src/Environment_UNIX.cpp @@ -184,7 +184,7 @@ void EnvironmentImpl::nodeIdImpl(NodeId& id) if (ifap->ifa_addr && ifap->ifa_addr->sa_family == AF_LINK) { struct sockaddr_dl* sdl = reinterpret_cast(ifap->ifa_addr); - caddr_t ap = (caddr_t) (sdl->sdl_data + sdl->sdl_nlen); + caddr_t ap = LLADDR(sdl); int alen = sdl->sdl_alen; if (ap && alen > 0) {