From 1f9113fee2da6c57c561616428439e2cdebf10e4 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Tue, 24 Feb 2015 12:47:13 +0100 Subject: port supl library package Also enhance the client to allow binding to an interface. --- package/supl/patches/patch-src_supl-client_c | 40 ++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 package/supl/patches/patch-src_supl-client_c (limited to 'package/supl/patches/patch-src_supl-client_c') diff --git a/package/supl/patches/patch-src_supl-client_c b/package/supl/patches/patch-src_supl-client_c new file mode 100644 index 000000000..15e2fa727 --- /dev/null +++ b/package/supl/patches/patch-src_supl-client_c @@ -0,0 +1,40 @@ + - implement bind to device functionality +--- trunk.orig/src/supl-client.c 2011-10-21 20:51:38.000000000 +0200 ++++ trunk/src/supl-client.c 2013-04-24 18:55:01.937252375 +0200 +@@ -252,6 +252,7 @@ static char *usage_str = + " --cell gsm:mcc,mns:lac,ci|wcdma:mcc,msn,uc set current gsm/wcdma cell id\n" + " --cell gsm:mcc,mns:lac,ci:lat,lon,uncert set known gsm cell id with position\n" + " --format|-f human machine parseable output\n" ++" --interface|-i iface bind to this interface\n" + " --debug|-d 1 == RRLP, 2 == SUPL, 4 == DEBUG\n" + " --debug-file file write debug to file\n" + " --help|-h show this help\n" +@@ -267,6 +268,7 @@ static struct option long_opts[] = { + { "cell", 1, 0, 0 }, + { "debug", 1, 0, 'd' }, + { "format", 1, 0, 'f' }, ++ { "interface", 1, 0, 0}, + { "test", 1, 0, 't' }, + { "set-pos", 1, 0, 0 }, + { "pos-helper", 1, 0, 0 }, +@@ -310,7 +312,7 @@ int main(int argc, char *argv[]) { + int opt_index; + int c; + +- c = getopt_long(argc, argv, "ad:f:t:", long_opts, &opt_index); ++ c = getopt_long(argc, argv, "ad:f:i:t:", long_opts, &opt_index); + if (c == -1) break; + switch (c) { + case 0: +@@ -374,6 +376,11 @@ int main(int argc, char *argv[]) { + } + break; + ++ case 'i': ++ strncpy(ctx.iface, optarg, IFNAMSIZ); ++ ctx.iface[IFNAMSIZ] = 0; ++ break; ++ + case 'd': + { + int debug = atoi(optarg); -- cgit v1.2.3