summaryrefslogtreecommitdiffstats
path: root/tdecore
diff options
context:
space:
mode:
authorormorph <[email protected]>2022-12-14 19:32:45 +0000
committerormorph <[email protected]>2022-12-14 19:32:45 +0000
commit8d96e85f7d273da88361260f125db04f60971a9a (patch)
tree2b05034d6842daadad44338302d3f735401cabb4 /tdecore
parentdaca4af7e37eefe2fa3ca2d4518411fef68fc641 (diff)
downloadtdelibs-8d96e85f7d273da88361260f125db04f60971a9a.tar.gz
tdelibs-8d96e85f7d273da88361260f125db04f60971a9a.zip
Added compatibility for hwlib support for musl
Signed-off-by: ormorph <[email protected]>
Diffstat (limited to 'tdecore')
-rw-r--r--tdecore/tdehw/tdehardwaredevices.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tdecore/tdehw/tdehardwaredevices.cpp b/tdecore/tdehw/tdehardwaredevices.cpp
index 0da216a87..70a7b7c45 100644
--- a/tdecore/tdehw/tdehardwaredevices.cpp
+++ b/tdecore/tdehw/tdehardwaredevices.cpp
@@ -2955,7 +2955,7 @@ void TDEHardwareDevices::updateExistingDeviceInformation(TDEGenericDevice *devic
ndevice->internalSetIpV6Netmask(address);
}
}
- s = getnameinfo(ifa->ifa_ifu.ifu_broadaddr, (family == AF_INET) ? sizeof(struct sockaddr_in) : sizeof(struct sockaddr_in6), host, NI_MAXHOST, NULL, 0, NI_NUMERICHOST);
+ s = ifa->ifa_ifu.ifu_broadaddr ? getnameinfo(ifa->ifa_ifu.ifu_broadaddr, (family == AF_INET) ? sizeof(struct sockaddr_in) : sizeof(struct sockaddr_in6), host, NI_MAXHOST, NULL, 0, NI_NUMERICHOST) : EAI_NONAME;
if (s == 0) {
TQString address(host);
if (family == AF_INET) {
@@ -2966,7 +2966,7 @@ void TDEHardwareDevices::updateExistingDeviceInformation(TDEGenericDevice *devic
ndevice->internalSetIpV6Broadcast(address);
}
}
- s = getnameinfo(ifa->ifa_ifu.ifu_dstaddr, (family == AF_INET) ? sizeof(struct sockaddr_in) : sizeof(struct sockaddr_in6), host, NI_MAXHOST, NULL, 0, NI_NUMERICHOST);
+ s = ifa->ifa_ifu.ifu_dstaddr ? getnameinfo(ifa->ifa_ifu.ifu_dstaddr, (family == AF_INET) ? sizeof(struct sockaddr_in) : sizeof(struct sockaddr_in6), host, NI_MAXHOST, NULL, 0, NI_NUMERICHOST) : EAI_NONAME;
if (s == 0) {
TQString address(host);
if (family == AF_INET) {