Commit c4479380 authored by Jonh Wendell's avatar Jonh Wendell
Browse files

Changed a bit the logic for local/non-local ifaddrs.h

parent 251c1015
......@@ -226,6 +226,10 @@ dnl *** Checks for ifaddrs.h ***
dnl ****************************
AC_CHECK_HEADER(ifaddrs.h)
AM_CONDITIONAL(SELF_IFADDRS, test "x$ac_cv_header_ifaddrs_h" != "xyes")
if test "x$ac_cv_header_ifaddrs_h" = "xyes"; then
AC_DEFINE(HAVE_IFADDRS_H, [1], [Define if we have system ifaddrs.h])
fi
dnl active plugins for vinagre.schemas
ACTIVE_PLUGINS="vnc"
......
......@@ -18,7 +18,7 @@ libvnc_la_SOURCES = \
vinagre-vnc-tunnel.h vinagre-vnc-tunnel.c
if SELF_IFADDRS
libvnc_la_SOURCES += ifaddrs.h getifaddrs.c
libvnc_la_SOURCES += if/ifaddrs.h if/getifaddrs.c
endif
libvnc_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS)
......
......@@ -18,14 +18,18 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include <net/if.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#ifdef HAVE_IFADDRS_H
#include <ifaddrs.h>
#else
#include "ifaddrs.h"
#include "if/ifaddrs.h"
#endif
#include <string.h>
#include <glib/gi18n.h>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment