summaryrefslogtreecommitdiff
path: root/psutil/_psutil_posix.c
diff options
context:
space:
mode:
authorLandry Breuil <landry@openbsd.org>2015-04-05 11:48:30 +0200
committerLandry Breuil <landry@openbsd.org>2015-04-05 11:48:30 +0200
commitd478f9be0d11257d6b1b0441731ad7c734d6d8c6 (patch)
treea79ba3482fa23c3d29947c05c42821a4b02d8ec9 /psutil/_psutil_posix.c
parente8954bdfb6b9486f81a18c7b5a44b34031b4289d (diff)
downloadpsutil-d478f9be0d11257d6b1b0441731ad7c734d6d8c6.tar.gz
OpenBSD has AF_LINK too
Diffstat (limited to 'psutil/_psutil_posix.c')
-rw-r--r--psutil/_psutil_posix.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/psutil/_psutil_posix.c b/psutil/_psutil_posix.c
index b5eabd79..462a4622 100644
--- a/psutil/_psutil_posix.c
+++ b/psutil/_psutil_posix.c
@@ -116,7 +116,7 @@ psutil_convert_ipaddr(struct sockaddr *addr, int family)
data = (const char *)lladdr->sll_addr;
}
#endif
-#if defined(__FreeBSD__) || defined(__APPLE__)
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__APPLE__)
else if (addr->sa_family == AF_LINK) {
// Note: prior to Python 3.4 socket module does not expose
// AF_LINK so we'll do.
@@ -519,7 +519,7 @@ void init_psutil_posix(void)
PyObject *module = Py_InitModule("_psutil_posix", PsutilMethods);
#endif
-#if defined(__FreeBSD__) || defined(__APPLE__) || defined(__sun)
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__APPLE__) || defined(__sun)
PyModule_AddIntConstant(module, "AF_LINK", AF_LINK);
#endif