better fix for redefined symbols

This commit is contained in:
gardners 2012-05-11 08:17:37 +09:30
parent 51966737a6
commit c70646039d

30
lsif.c
View File

@ -25,28 +25,8 @@
* http://teotwawki.steubentech.com/
*
*/
#include <errno.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <sys/ioctl.h>
#if __MACH__ || __NetBSD__ || __OpenBSD__ || __FreeBSD__
#include <sys/sysctl.h>
#endif
/* Include sockio.h if needed */
#ifndef SIOCGIFCONF
#include <sys/sockio.h>
#endif
#include <netinet/in.h>
#include <net/if.h>
#include <netinet/if_ether.h>
#if __MACH__
#include <net/if_dl.h>
#endif
#include "serval.h"
/* On platforms that have variable length
ifreq use the old fixed length interface instead */
@ -59,12 +39,6 @@
#define SIOCGIFBRDADDR OSIOCGIFBRDADDR
#endif
#ifdef ANDROID
#include "serval.h"
#else
#warning for some reason including serval.h here causes ifmap, ifreq and ifconf to be redefined on some linux distros
#endif
/* for when all other options fail, as can happen on Android,
if the permissions for the socket-based method are broken.
Down side is that it while it gets the interface name and