Re: [PATCH] nwfilter: add a missing define, so libvirtd builds on macos x

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 On 09/27/2010 09:45 AM, Justin Clift wrote:
The nwfilter code uses ETH_ALEN, which isn't defined on MacOS X.
This is a simple workaround, to add it when missing.

Since the OSX network stack is based on *BSD, I'm assuming that iptables support isn't there anyway. When iptables isn't in, the nwfilter stuff shouldn't be included, so why is this even being compiled?


---
  src/nwfilter/nwfilter_learnipaddr.c |    5 +++++
  1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/nwfilter/nwfilter_learnipaddr.c b/src/nwfilter/nwfilter_learnipaddr.c
index 7c94fc2..554422b 100644
--- a/src/nwfilter/nwfilter_learnipaddr.c
+++ b/src/nwfilter/nwfilter_learnipaddr.c
@@ -38,6 +38,11 @@
  #include<net/if_arp.h>
  #include<intprops.h>

+// Add Linux define missing from OSX
+#ifndef ETH_ALEN
+#define ETH_ALEN       6               /* Octets in one ethernet addr   */
+#endif
+
  #include "internal.h"

  #include "buf.h"

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]