Fix compilation for android

This commit is contained in:
Jeremy Lakeman 2012-07-24 16:04:59 +09:30
parent 6de247e576
commit 9a16fe4e96

View File

@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
int main(int argc,char **argv)
{
void *h = dlopen("/data/data/org.servalproject/lib/libserval.so",RTLD_LAZY);
int (*servalmain)(int,const char *const*) = dlsym(h,"parseCommandLine");
int (*servalmain)(const char *, int, const char *const *) = dlsym(h,"parseCommandLine");
if (!servalmain) return fprintf(stderr,"Could not load libserval.so\n");
return (*servalmain)(argv[0], argc - 1, (const char*const*)&argv[1]);
}