* $Id$
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
- * Remi Denis-Courmont <courmisch@via.ecp.fr>
+ * Remi Denis-Courmont <rem # videolan.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*****************************************************************************/
#define LISTEN_BACKLOG 100
-#if defined(HAVE_GETNAMEINFO) && !defined(HAVE_GETADDRINFO)
-/*
- * For now, VLC's configure script does not check for getaddrinfo(),
- * but it should be present if getnameinfo() is (the opposite is untrue, with
- * Debian potato as an example)
- */
-# define HAVE_GETADDRINFO 1
-#endif
-
static void httpd_HostThread( httpd_host_t * );
static int GetAddrPort( const struct sockaddr_storage *p_ss );
vlc_value_t val;
char psz_port[6];
struct addrinfo hints;
- int res;
+ int check;
memset( &hints, 0, sizeof( hints ) );
snprintf( psz_port, sizeof( psz_port ), "%d", i_port );
psz_port[sizeof( psz_port ) - 1] = '\0';
- res = getaddrinfo( psz_host, psz_port, &hints, &res );
- if( res != 0 )
+ check = getaddrinfo( psz_host, psz_port, &hints, &res );
+ if( check != 0 )
{
#ifdef HAVE_GAI_STRERROR
msg_Err( p_this, "cannot resolve %s:%d : %s", psz_host, i_port,
- gai_strerror( res ) );
+ gai_strerror( check ) );
#else
msg_Err( p_this, "cannot resolve %s:%d", psz_host, i_port );
#endif