The patches for compile for Android NDK building.
GoogleCodeExporter opened this issue · comments
Google Code Exporter commented
I have ported libjingle to an Android DNK library and built a P2P application.
In currently source (reversion 77), some files should be modified to compile
successful. The attached file is the patch.
Index: p2p/client/httpportallocator.cc
===================================================================
--- p2p/client/httpportallocator.cc (revision 77)
+++ p2p/client/httpportallocator.cc (working copy)
@@ -101,7 +101,8 @@
talk_base::PacketSocketFactory* socket_factory,
const std::string &user_agent)
: BasicPortAllocator(network_manager, socket_factory), agent_(user_agent) {
- relay_hosts_.push_back("relay.google.com");
+ //relay_hosts_.push_back("relay.google.com");
+ relay_hosts_.push_back("xmpp.ppcam.tv");
stun_hosts_.push_back(
talk_base::SocketAddress("stun.l.google.com", 19302));
}
@@ -110,7 +111,8 @@
talk_base::NetworkManager* network_manager,
const std::string &user_agent)
: BasicPortAllocator(network_manager), agent_(user_agent) {
- relay_hosts_.push_back("relay.google.com");
+ //relay_hosts_.push_back("relay.google.com");
+ relay_hosts_.push_back("xmpp.ppcam.tv");
stun_hosts_.push_back(
talk_base::SocketAddress("stun.l.google.com", 19302));
}
Index: base/latebindingsymboltable.cc
===================================================================
--- base/latebindingsymboltable.cc (revision 77)
+++ base/latebindingsymboltable.cc (working copy)
@@ -37,7 +37,7 @@
inline static const char *GetDllError() {
#ifdef LINUX
- char *err = dlerror();
+ const char *err = dlerror();
if (err) {
return err;
} else {
@@ -75,7 +75,7 @@
void **symbol) {
#ifdef LINUX
*symbol = dlsym(handle, symbol_name);
- char *err = dlerror();
+ const char *err = dlerror();
if (err) {
LOG(LS_ERROR) << "Error loading symbol " << symbol_name << ": " << err;
return false;
Index: base/unixfilesystem.cc
===================================================================
--- base/unixfilesystem.cc (revision 77)
+++ base/unixfilesystem.cc (working copy)
@@ -483,9 +483,9 @@
existing_path.SetFolder(existing_path.parent_folder());
}
#ifdef ANDROID
- struct statfs fs;
- memset(&fs, 0, sizeof(fs));
- if (0 != statfs(existing_path.pathname().c_str(), &fs))
+ struct statfs vfs;
+ memset(&vfs, 0, sizeof(vfs));
+ if (0 != statfs(existing_path.pathname().c_str(), &vfs))
return false;
#else
struct statvfs vfs;
Original issue reported on code.google.com by achang.z...@gmail.com
on 24 Aug 2011 at 2:47
Attachments:
Google Code Exporter commented
I can't change the issue's text, the p2p/client/httpportallocator.cc is not for
compile , just for our own project.
M base/latebindingsymboltable.cc
M base/unixfilesystem.cc
These two files should be modified for android NDK building.
Original comment by achang.z...@gmail.com
on 24 Aug 2011 at 2:51
Google Code Exporter commented
Jun, can you land this patch?
Original comment by juberti@google.com
on 21 Dec 2011 at 11:28
Google Code Exporter commented
Original comment by jun...@google.com
on 3 Jan 2012 at 6:41
- Changed state: Started
Google Code Exporter commented
Original comment by jun...@google.com
on 4 Jan 2012 at 5:27
- Changed state: Done