[pve-devel] [PATCH common] network: get rid of ioctl.ph
Wolfgang Bumiller
w.bumiller at proxmox.com
Fri Feb 12 10:42:54 CET 2016
---
src/PVE/Network.pm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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;
}
--
2.1.4
More information about the pve-devel
mailing list