This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[COMMITTED PATCH] Define ETH_ALEN in generic <netinet/if_ether.h>.
- From: Roland McGrath <roland at hack dot frob dot com>
- To: "GNU C. Library" <libc-alpha at sourceware dot org>
- Date: Wed, 4 Mar 2015 16:13:01 -0800 (PST)
- Subject: [COMMITTED PATCH] Define ETH_ALEN in generic <netinet/if_ether.h>.
- Authentication-results: sourceware.org; auth=none
This makes test-ether_line.c compile in a configuration using the generic
netinet/if_ether.h file. The ether-related headers could use some further
cleanup and consolidation, but this fixes the immediate problem.
Thanks,
Roland
* sysdeps/generic/netinet/if_ether.h: Don't #include <features.h>.
(ETH_ALEN): New macro.
(struct ether_addr): Use it for length of ether_addr_octet.
--- a/sysdeps/generic/netinet/if_ether.h
+++ b/sysdeps/generic/netinet/if_ether.h
@@ -16,17 +16,17 @@
<http://www.gnu.org/licenses/>. */
#ifndef __NETINET_IF_ETHER_H
-
#define __NETINET_IF_ETHER_H 1
-#include <features.h>
#include <sys/types.h>
+#define ETH_ALEN 6 /* Octets in one ethernet address. */
+
/* This is a name for the 48 bit ethernet address available on many
systems. */
struct ether_addr
{
- u_int8_t ether_addr_octet[6];
+ u_int8_t ether_addr_octet[ETH_ALEN];
} __attribute__ ((__packed__));
#endif /* netinet/if_ether.h */