D26729: do not disable getifaddrs use because of sa_len availablility
sitter marked an inline comment as done. sitter added inline comments. INLINE COMMENTS > jjazeix wrote in nic.cpp:137 > buf is not defined in this conditional and causes a build fail on freebsd: > https://build.kde.org/view/Failing/job/Plasma/job/kinfocenter/job/kf5-qt5%20FreeBSDQt5.13/lastFailedBuild/ thanks. should be fixed REPOSITORY R102 KInfoCenter REVISION DETAIL https://phabricator.kde.org/D26729 To: sitter, ngraham Cc: jjazeix, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
D26729: do not disable getifaddrs use because of sa_len availablility
jjazeix added inline comments. INLINE COMMENTS > nic.cpp:137 > +#ifdef HAVE_STRUCT_SOCKADDR_SA_LEN > +return getnameinfo(addr, ifa->ifa_addr->sa_len, buf, 127, 0, 0, > NI_NUMERICHOST); > +#else buf is not defined in this conditional and causes a build fail on freebsd: https://build.kde.org/view/Failing/job/Plasma/job/kinfocenter/job/kf5-qt5%20FreeBSDQt5.13/lastFailedBuild/ REPOSITORY R102 KInfoCenter REVISION DETAIL https://phabricator.kde.org/D26729 To: sitter, ngraham Cc: jjazeix, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
D26729: do not disable getifaddrs use because of sa_len availablility
This revision was automatically updated to reflect the committed changes. Closed by commit R102:4582053b7cac: do not disable getifaddrs use because of sa_len availablility (authored by sitter). REPOSITORY R102 KInfoCenter CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D26729?vs=73777=74792 REVISION DETAIL https://phabricator.kde.org/D26729 AFFECTED FILES Modules/nics/nic.cpp To: sitter, ngraham Cc: plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
D26729: do not disable getifaddrs use because of sa_len availablility
sitter updated this revision to Diff 73777. sitter added a comment. committing the latest working tree helps a lot -.- REPOSITORY R102 KInfoCenter CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D26729?vs=73776=73777 BRANCH ipv6 REVISION DETAIL https://phabricator.kde.org/D26729 AFFECTED FILES Modules/nics/nic.cpp To: sitter Cc: plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
D26729: do not disable getifaddrs use because of sa_len availablility
sitter created this revision. Herald added a project: Plasma. Herald added a subscriber: plasma-devel. sitter requested review of this revision. REVISION SUMMARY this fixes ipv6 support in nic listing. well, kinda. the getifaddrs branch is the only one supporting ipv6 properly so it seems silly to use the ioctl branch just because sa_len is not available. simply wrap around getnameinfo and either use sa_len or determine the length based on the socket family (as seen on the getifaddrs manpage). this way the branch compiles fine without sa_len and is fine to use by just about all glibc systems thus giving us ipv6 support on just about every glib system. BUG: 313892 FIXED-IN: 5.18.0 TEST PLAN built on neon. shows ipv6 addresses REPOSITORY R102 KInfoCenter BRANCH ipv6 REVISION DETAIL https://phabricator.kde.org/D26729 AFFECTED FILES Modules/nics/nic.cpp To: sitter Cc: plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart