From: Wolfgang Bumiller Date: Fri, 12 Feb 2016 09:42:54 +0000 (+0100) Subject: network: get rid of ioctl.ph X-Git-Url: https://git.proxmox.com/?p=pve-common.git;a=commitdiff_plain;h=f029c1d09292a37bb336ae8dd7c7a747d32ee60c;hp=d1e490c12f6c5cf22b5ddd7c5dc78bab0950726b network: get rid of ioctl.ph --- diff --git a/src/PVE/Network.pm b/src/PVE/Network.pm index dd36505..0f92e30 100644 --- a/src/PVE/Network.pm +++ b/src/PVE/Network.pm @@ -11,11 +11,11 @@ use POSIX qw(ECONNREFUSED); use Net::IP; -require "sys/ioctl.ph"; use Socket qw(IPPROTO_IP); use constant IFF_UP => 1; use constant IFNAMSIZ => 16; +use constant SIOCGIFFLAGS => 0x8913; # host network related utility functions @@ -538,7 +538,7 @@ sub get_active_interfaces { next if $line !~ /^\s*([^:\s]+):/; my $ifname = $1; my $ifreq = pack($STRUCT_IFREQ_SIOCGIFFLAGS, $1, 0); - if (!defined(ioctl($sock, &SIOCGIFFLAGS, $ifreq))) { + if (!defined(ioctl($sock, SIOCGIFFLAGS, $ifreq))) { warn "failed to get interface flags for: $ifname\n"; next; }