Skip to content

Commit

Permalink
Remove the meaningless on Linux if_dl.h header.
Browse files Browse the repository at this point in the history
This was misleading 'configure' into thinking we actually support AF_LINK,
but we're Linux, so we don't, and we never implemented the functions we
declared here either.

Reported to AOSP by Jun-ya Kato.

(cherry-pick of 5056f1f.)

Change-Id: Ic67f674d2221497c8166994812bb5fc7f0831066
  • Loading branch information
enh-google authored and Whitehawkx committed Jun 17, 2012
1 parent 5c0b9e8 commit 1094a5b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 89 deletions.
87 changes: 0 additions & 87 deletions libc/include/net/if_dl.h

This file was deleted.

10 changes: 8 additions & 2 deletions libc/netbsd/net/getnameinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ __RCSID("$NetBSD: getnameinfo.c,v 1.43 2006/02/17 15:58:26 ginsbach Exp $");
#include <sys/types.h>
#include <sys/socket.h>
#include <net/if.h>
#if defined(ANDROID_CHANGES) && defined(AF_LINK)
#include <net/if_dl.h>
#endif
#include <net/if_ieee1394.h>
#include <net/if_types.h>
#include <netinet/in.h>
Expand Down Expand Up @@ -104,8 +106,10 @@ static int ip6_parsenumeric __P((const struct sockaddr *, const char *, char *,
static int ip6_sa2str __P((const struct sockaddr_in6 *, char *, size_t,
int));
#endif
#if defined(ANDROID_CHANGES) && defined(AF_LINK)
static int getnameinfo_link __P((const struct sockaddr *, socklen_t, char *,
socklen_t, char *, socklen_t, int));
#endif
static int hexname __P((const u_int8_t *, size_t, char *, socklen_t));

/*
Expand All @@ -119,7 +123,7 @@ int getnameinfo(const struct sockaddr* sa, socklen_t salen, char* host, size_t h
case AF_INET6:
return getnameinfo_inet(sa, salen, host, hostlen,
serv, servlen, flags);
#if 0
#if defined(ANDROID_CHANGES) && defined(AF_LINK)
case AF_LINK:
return getnameinfo_link(sa, salen, host, hostlen,
serv, servlen, flags);
Expand Down Expand Up @@ -393,7 +397,7 @@ getnameinfo_inet(sa, salen, host, hostlen, serv, servlen, flags)
#endif

if (hp) {
#if 0
#if defined(ANDROID_CHANGES) && defined(AF_LINK)
/*
* commented out, since "for local host" is not
* implemented here - see RFC2553 p30
Expand Down Expand Up @@ -531,6 +535,7 @@ ip6_sa2str(sa6, buf, bufsiz, flags)
#endif /* INET6 */


#if defined(ANDROID_CHANGES) && defined(AF_LINK)
/*
* getnameinfo_link():
* Format a link-layer address into a printable format, paying attention to
Expand Down Expand Up @@ -608,6 +613,7 @@ getnameinfo_link(const struct sockaddr *sa, socklen_t salen,
(size_t)sdl->sdl_alen, host, hostlen);
}
}
#endif

static int
hexname(cp, len, host, hostlen)
Expand Down

0 comments on commit 1094a5b

Please sign in to comment.