mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-01-31 08:25:22 +00:00
better fix for redefined symbols
This commit is contained in:
parent
51966737a6
commit
c70646039d
30
lsif.c
30
lsif.c
@ -25,28 +25,8 @@
|
|||||||
* http://teotwawki.steubentech.com/
|
* http://teotwawki.steubentech.com/
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#include <errno.h>
|
|
||||||
#include <stdlib.h>
|
#include "serval.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
|
|
||||||
|
|
||||||
/* On platforms that have variable length
|
/* On platforms that have variable length
|
||||||
ifreq use the old fixed length interface instead */
|
ifreq use the old fixed length interface instead */
|
||||||
@ -59,12 +39,6 @@
|
|||||||
#define SIOCGIFBRDADDR OSIOCGIFBRDADDR
|
#define SIOCGIFBRDADDR OSIOCGIFBRDADDR
|
||||||
#endif
|
#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,
|
/* for when all other options fail, as can happen on Android,
|
||||||
if the permissions for the socket-based method are broken.
|
if the permissions for the socket-based method are broken.
|
||||||
Down side is that it while it gets the interface name and
|
Down side is that it while it gets the interface name and
|
||||||
|
Loading…
x
Reference in New Issue
Block a user