summaryrefslogtreecommitdiff
path: root/package/python-netifaces/python-netifaces-ifaddrs-uclibc.patch
blob: 375b08da15241235453987a87ad3a47a9db23e12 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
[PATCH] fix compile error in ifaddrs() for HAVE_SOCKET_IOCTLS variant

Used on E.G. uClibc. This variant seems to have bitrotten somewhat.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 netifaces.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: netifaces-0.6/netifaces.c
===================================================================
--- netifaces-0.6.orig/netifaces.c
+++ netifaces-0.6/netifaces.c
@@ -624,7 +624,7 @@
   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);
@@ -633,7 +633,7 @@
       if (!hwaddr || !dict || !list || !family) {
         Py_XDECREF (hwaddr);
         Py_XDECREF (dict);
-        Py_XDECREF (list)
+        Py_XDECREF (list);
         Py_XDECREF (family);
         Py_XDECREF (result);
         close (sock);