make android compile

pull/729/head
Jeff Becker 5 years ago
parent 515b8f2b76
commit 909e0399d6
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -1,5 +1,5 @@
#include <llarp.h>
#include <config.hpp>
#include <config/config.hpp>
#include <util/fs.hpp>
#include <jni.h>
@ -40,7 +40,7 @@ struct AndroidMain
m_impl = llarp_main_init(configFile.c_str(), true);
if(m_impl == nullptr)
return false;
if(llarp_main_setup(m_impl))
if(llarp_main_setup(m_impl, false))
{
llarp_main_free(m_impl);
m_impl = nullptr;

@ -6,7 +6,7 @@ namespace llarp
{
void
AndroidLogStream::PreLog(std::stringstream& ss, LogLevel lvl,
const char* fname, int lineno) const
const char* fname, int lineno, const std::string&) const
{
switch(lvl)
{
@ -31,7 +31,7 @@ namespace llarp
}
void
AndroidLogStream::PostLog(std::stingstream&) const
AndroidLogStream::PostLog(std::stringstream&) const
{
}

@ -1,5 +1,5 @@
#ifndef LLARP_UTIL_OSTREAM_LOGGER_HPP
#define LLARP_UTIL_OSTREAM_LOGGER_HPP
#ifndef LLARP_UTIL_ANDROID_LOGGER_HPP
#define LLARP_UTIL_ANDROID_LOGGER_HPP
#include <util/logstream.hpp>
#include <iostream>
@ -10,13 +10,13 @@ namespace llarp
{
void
PreLog(std::stringstream& s, LogLevel lvl, const char* fname,
int lineno) const override;
int lineno, const std::string& nodename) const override;
void
Log(LogLevel lvl, const std::string& msg) override;
Print(LogLevel lvl,const char* filename, const std::string& msg) override;
void
PostLog(std::stringstream&) const override{};
PostLog(std::stringstream&) const override;
void Tick(llarp_time_t) override;
};

@ -11,9 +11,7 @@ namespace llarp
/// logger stream interface
struct ILogStream
{
virtual ~ILogStream()
{
}
virtual ~ILogStream() = default;
virtual void
PreLog(std::stringstream& out, LogLevel lvl, const char* fname, int lineno,

@ -187,13 +187,15 @@ tuntap_sys_set_ipv4(struct device *dev, t_tun_in_addr *s4, uint32_t bits)
return 0;
}
#if defined(ANDROID)
#else
struct in6_ifreq {
struct in6_addr ifr6_addr;
__u32 ifr6_prefixlen;
unsigned int ifr6_ifindex;
};
#endif
int
tuntap_sys_set_ipv6(struct device *dev, t_tun_in6_addr *s6, uint32_t bits)

Loading…
Cancel
Save