1
0
Fork 0
mirror of https://github.com/polybar/polybar.git synced 2024-11-11 13:50:56 -05:00

fix(build): replace caddr_t with char* (#1454)

caddr_t isn't defined on all systems

Fixes #1447
This commit is contained in:
james9837 2018-10-03 10:35:31 -04:00 committed by Patrick Ziegler
parent 2fba443f56
commit 654c667698

View file

@ -194,7 +194,7 @@ namespace net {
*/
strncpy(request.ifr_name, m_interface.c_str(), IFNAMSIZ - 1);
request.ifr_data = reinterpret_cast<caddr_t>(&driver);
request.ifr_data = reinterpret_cast<char*>(&driver);
if (ioctl(*m_socketfd, SIOCETHTOOL, &request) == -1) {
return;
@ -258,7 +258,7 @@ namespace net {
memset(&request, 0, sizeof(request));
strncpy(request.ifr_name, m_interface.c_str(), IFNAMSIZ - 1);
data.cmd = ETHTOOL_GSET;
request.ifr_data = reinterpret_cast<caddr_t>(&data);
request.ifr_data = reinterpret_cast<char*>(&data);
if (ioctl(*m_socketfd, SIOCETHTOOL, &request) == -1) {
return false;
@ -283,7 +283,7 @@ namespace net {
memset(&request, 0, sizeof(request));
strncpy(request.ifr_name, m_interface.c_str(), IFNAMSIZ - 1);
data.cmd = ETHTOOL_GLINK;
request.ifr_data = reinterpret_cast<caddr_t>(&data);
request.ifr_data = reinterpret_cast<char*>(&data);
if (ioctl(*m_socketfd, SIOCETHTOOL, &request) == -1) {
return false;