summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlastair Houghton <alastair@coriolis-systems.com>2012-01-31 11:11:48 +0000
committerAlastair Houghton <alastair@coriolis-systems.com>2012-01-31 11:11:48 +0000
commitb37d5442eadd6301af8587e508959274d9659d50 (patch)
treed1287361c60b00b093e37e3eaf4224fd0c1a1eb7
parent230c123e2e2f36cfaab14a59ad8e37e14a8aa5df (diff)
downloadnetifaces-b37d5442eadd6301af8587e508959274d9659d50.tar.gz
Fixed bit-rot in the ioctl-based code path.
-rw-r--r--netifaces.c2
-rw-r--r--setup.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/netifaces.c b/netifaces.c
index 9d381d5..2432842 100644
--- a/netifaces.c
+++ b/netifaces.c
@@ -839,7 +839,7 @@ ifaddrs (PyObject *self, PyObject *args)
if (ioctl (sock, SIOCGIFHWADDR, &ifr) == 0) {
found = TRUE;
- if (string_from_sockaddr (ifr->CNAME(ifr_addr), buffer, sizeof (buffer)) == 0) {
+ if (string_from_sockaddr ((struct sockaddr *)&ifr.CNAME(ifr_addr), buffer, sizeof (buffer)) == 0) {
PyObject *hwaddr = PyString_FromString (buffer);
PyObject *dict = PyDict_New ();
PyObject *list = PyList_New (1);
diff --git a/setup.py b/setup.py
index 9973d0b..d190dfd 100644
--- a/setup.py
+++ b/setup.py
@@ -7,7 +7,7 @@ from setuptools.command.build_ext import build_ext
from distutils.errors import *
import pickle
-__version__ = "0.7"
+__version__ = "0.8"
# Disable hard links, otherwise building distributions fails on OS X
try: