Fix hardware address retrieval on OpenBSD.

https://bugzilla.gnome.org/show_bug.cgi?id=652997
This commit is contained in:
Jasper Lievisse Adriaanse
2011-06-22 17:26:55 +02:00
parent 537dc1bff1
commit aa1a6766f2

View File

@@ -1,4 +1,4 @@
/* $OpenBSD: netload.c,v 1.5 2011/06/20 11:48:39 jasper Exp $ */
/* $OpenBSD: netload.c,v 1.4 2011/06/20 09:50:04 jasper Exp $ */
/* Copyright (C) 1998-99 Martin Baulig
This file is part of LibGTop 1.0.
@@ -190,7 +190,7 @@ glibtop_get_netload_p (glibtop *server, glibtop_netload *buf,
struct sockaddr_dl *dl = (struct sockaddr_dl *) sa;
memcpy (buf->hwaddress, LLADDR (dl), sizeof (buf->hwaddress));
buf->flags |= GLIBTOP_NETLOAD_HWADDRESS;
buf->flags |= (1L << GLIBTOP_NETLOAD_HWADDRESS);
} else if (sa->sa_family == AF_INET) {
sin = (struct sockaddr_in *)sa;
buf->subnet = ifaddr.in.ia_netmask;