fix for 596493 from upstream
[debian/sudo] / interfaces.h
index d4d4dd0d204ba81aca3d6f6019f4428a823ad3ea..06b0b8571db0a753d02796d741c8e46e4bcde19a 100644 (file)
  * Sponsored in part by the Defense Advanced Research Projects
  * Agency (DARPA) and Air Force Research Laboratory, Air Force
  * Materiel Command, USAF, under agreement number F39502-99-1-0512.
- *
- * $Sudo: interfaces.h,v 1.12 2008/11/09 14:13:12 millert Exp $
  */
 
 #ifndef _SUDO_INTERFACES_H
 #define _SUDO_INTERFACES_H
 
+/*
+ * Union to hold either strucr in_addr or in6_add
+ */
+union sudo_in_addr_un {
+    struct in_addr ip4;
+#ifdef HAVE_IN6_ADDR
+    struct in6_addr ip6;
+#endif
+};
+
 /*
  * IP address and netmask pairs for checking against local interfaces.
  */
 struct interface {
     int family;        /* AF_INET or AF_INET6 */
-    union {
-       struct in_addr ip4;
-#ifdef HAVE_IN6_ADDR
-       struct in6_addr ip6;
-#endif
-    } addr;
-    union {
-       struct in_addr ip4;
-#ifdef HAVE_IN6_ADDR
-       struct in6_addr ip6;
-#endif
-    } netmask;
+    union sudo_in_addr_un addr;
+    union sudo_in_addr_un netmask;
 };
 
 /*