Permalink
Browse files

Fix the issue raised in #1070 without possibility of name collisions

  • Loading branch information...
1 parent e146d96 commit efd7d7f82be405fe47f6806b6cc9c0043885bc2e @cjdelisle committed Jun 24, 2017
Showing with 7 additions and 9 deletions.
  1. +7 −9 util/platform/netdev/NetPlatform_linux.c
@@ -49,14 +49,12 @@
* the same structures, leading to redefinition errors.
* For the second operand, we're grateful to android/bionic, platform level 21.
*/
-#if !defined(_LINUX_IN6_H) && !defined(_UAPI_LINUX_IN6_H)
- struct in6_ifreq
- {
- struct in6_addr ifr6_addr;
- uint32_t ifr6_prefixlen;
- int ifr6_ifindex;
- };
-#endif
+struct Cjdns_in6_ifreq
+{
+ struct in6_addr ifr6_addr;
+ uint32_t ifr6_prefixlen;
+ int ifr6_ifindex;
+};
/**
* Get a socket and ifRequest for a given interface by name.
@@ -141,7 +139,7 @@ void NetPlatform_addAddress(const char* interfaceName,
checkInterfaceUp(s, &ifRequest, logger, eh);
if (addrFam == Sockaddr_AF_INET6) {
- struct in6_ifreq ifr6 = {
+ struct Cjdns_in6_ifreq ifr6 = {
.ifr6_ifindex = ifIndex,
.ifr6_prefixlen = prefixLen
};

0 comments on commit efd7d7f

Please sign in to comment.