1667. [port] linux: not all versions have IF_NAMESIZE.

This commit is contained in:
Mark Andrews
2004-06-19 00:48:15 +00:00
parent 36e0109263
commit 358043e40f
3 changed files with 19 additions and 2 deletions
+2
View File
@@ -1,3 +1,5 @@
1667. [port] linux: not all versions have IF_NAMESIZE.
1666. [bug] The optional port on hostnames in dual-stack-servers
was being ignored.
+11 -1
View File
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: ifiter_ioctl.c,v 1.46 2004/05/06 03:16:07 marka Exp $ */
/* $Id: ifiter_ioctl.c,v 1.47 2004/06/19 00:48:15 marka Exp $ */
/*
* Obtain the list of network interfaces using the SIOCGLIFCONF ioctl.
@@ -100,6 +100,16 @@ struct isc_interfaceiter {
#define IFCONF_BUFSIZE_INITIAL 4096
#define IFCONF_BUFSIZE_MAX 1048576
#ifdef __linux
#ifndef IF_NAMESIZE
# ifdef IFNAMSIZ
# define IF_NAMESIZE IFNAMSIZ
# else
# define IF_NAMESIZE 16
# endif
#endif
#endif
static isc_result_t
getbuf4(isc_interfaceiter_t *iter) {
char strbuf[ISC_STRERRORSIZE];
+6 -1
View File
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: interfaceiter.c,v 1.36 2004/04/20 06:46:46 marka Exp $ */
/* $Id: interfaceiter.c,v 1.37 2004/06/19 00:48:15 marka Exp $ */
#include <config.h>
@@ -65,6 +65,11 @@ get_addr(unsigned int family, isc_netaddr_t *dst, struct sockaddr *src,
{
struct sockaddr_in6 *sa6;
#if !defined(ISC_PLATFORM_HAVEIFNAMETOINDEX) || \
!defined(ISC_PLATFORM_HAVESCOPEID)
UNUSED(ifname);
#endif
/* clear any remaining value for safety */
memset(dst, 0, sizeof(*dst));