Skip to content

Commit

Permalink
#663: freebsd implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
giampaolo committed Mar 10, 2015
1 parent 725dfb4 commit af73248
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions psutil/_psutil_posix.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
#include <sys/types.h>
#include <sys/socket.h>
#include <ifaddrs.h>
#include <net/if.h>

#ifdef __linux
#include <netdb.h>
#include <linux/if_packet.h>
#include <linux/if.h>
#endif // end linux

#if defined(__FreeBSD__) || defined(__APPLE__)
Expand Down Expand Up @@ -188,7 +188,7 @@ psutil_net_if_addrs(PyObject* self, PyObject* args)
if (py_netmask == NULL)
goto error;

#ifdef __linux
#if defined(__linux) || defined(__FreeBSD__)
if (ifa->ifa_flags & IFF_BROADCAST) {
py_broadcast = psutil_convert_ipaddr(ifa->ifa_broadaddr, family);
Py_INCREF(Py_None);
Expand Down

0 comments on commit af73248

Please sign in to comment.