aboutsummaryrefslogtreecommitdiff
path: root/nxcomp/Loop.cpp
diff options
context:
space:
mode:
authorNito Martinez <Nito@Qindel.ES>2015-02-10 19:47:58 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2015-02-10 19:47:58 +0100
commit79f218b563f6a4d3b17e92ee85ad242575daf8da (patch)
tree1f5290e0ba44b23228730d9261505e92a440cf5b /nxcomp/Loop.cpp
parent46c2aebca5196ad4c10bb4f6f2558d656c22f5d9 (diff)
downloadnx-libs-79f218b563f6a4d3b17e92ee85ad242575daf8da.tar.gz
nx-libs-79f218b563f6a4d3b17e92ee85ad242575daf8da.tar.bz2
nx-libs-79f218b563f6a4d3b17e92ee85ad242575daf8da.zip
Fix FTBFS of nxproxy/nxcomp on Android (212_nxcomp_build-on-Android.full+lite.patch).
Diffstat (limited to 'nxcomp/Loop.cpp')
-rw-r--r--nxcomp/Loop.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/nxcomp/Loop.cpp b/nxcomp/Loop.cpp
index d5c8eb25d..05b514570 100644
--- a/nxcomp/Loop.cpp
+++ b/nxcomp/Loop.cpp
@@ -4187,7 +4187,7 @@ int SetupDisplaySocket(int &xServerAddrFamily, sockaddr *&xServerAddr,
#endif
- char *separator = rindex(display, ':');
+ char *separator = strrchr(display, ':');
if ((separator == NULL) || !isdigit(*(separator + 1)))
{
@@ -8240,7 +8240,7 @@ int ParseEnvironmentOptions(const char *env, int force)
char *name;
char *value;
- value = rindex(nextOpts, ':');
+ value = strrchr(nextOpts, ':');
if (value != NULL)
{
@@ -11010,7 +11010,7 @@ int ParsePackOption(const char *opt)
packMethod == PACK_LOSSLESS ||
packMethod == PACK_ADAPTIVE)
{
- const char *dash = rindex(opt, '-');
+ const char *dash = strrchr(opt, '-');
if (dash != NULL && strlen(dash) == 2 &&
*(dash + 1) >= '0' && *(dash + 1) <= '9')
@@ -12275,6 +12275,10 @@ int SetShmem()
control -> ShmemServer = 0;
}
+ // For android, no shared memory available
+ control -> ShmemServer = 0;
+ control -> ShmemClientSize = 0;
+
return 1;
}
@@ -13525,7 +13529,7 @@ int ParseHostOption(const char *opt, char *host, int &port)
int newPort = port;
- const char *separator = rindex(opt, ':');
+ const char *separator = strrchr(opt, ':');
if (separator != NULL)
{