add wireless tools
[openwrt.git] / package / wireless-tools / patches / debian-2.patch
1 --- wireless-tools-27.orig/iwlib.c
2 +++ wireless-tools-27/iwlib.c
3 @@ -622,6 +622,7 @@
4 {
5 struct iwreq wrq;
6
7 + memset((char *) &wrq, 0, sizeof(struct iwreq));
8 memset((char *) info, 0, sizeof(struct wireless_config));
9
10 /* Get wireless name */
11 --- wireless-tools-27.orig/Makefile
12 +++ wireless-tools-27/Makefile
13 @@ -64,8 +64,8 @@
14 # Install directories
15 INSTALL_DIR= $(PREFIX)/sbin/
16 INSTALL_LIB= $(PREFIX)/lib/
17 -INSTALL_INC= $(PREFIX)/include/
18 -INSTALL_MAN= $(PREFIX)/man/
19 +INSTALL_INC= $(PREFIX)/usr/include/
20 +INSTALL_MAN= $(PREFIX)/usr/share/man/
21
22 # Various commands
23 RM = rm -f
24 @@ -81,9 +81,9 @@
25 endif
26
27 # Other flags
28 -CFLAGS=-Os -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow \
29 +#CFLAGS=-Os -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow \
30 -Wpointer-arith -Wcast-qual -Winline -I.
31 -#CFLAGS=-O2 -W -Wall -Wstrict-prototypes -I.
32 +CFLAGS=-O2 -W -Wall -Wstrict-prototypes -I.
33 DEPFLAGS=-MMD
34 XCFLAGS=$(CFLAGS) $(DEPFLAGS) $(WARN) $(HEADERS) $(WELIB_FLAG)
35 PICFLAG=-fPIC
36 --- wireless-tools-27.orig/iwlist.c
37 +++ wireless-tools-27/iwlist.c
38 @@ -870,7 +870,7 @@
39 struct iw_range range;
40 int has_range;
41 struct timeval tv; /* Select timeout */
42 - int timeout = 5000000; /* 5s */
43 + int timeout = 15000000; /* 15s */
44
45 /* Avoid "Unused parameter" warning */
46 args = args; count = count;
47 --- wireless-tools-27.orig/iwconfig.c
48 +++ wireless-tools-27/iwconfig.c
49 @@ -835,10 +835,10 @@
50 }
51 else
52 {
53 - /* '-' allow to escape the ESSID string, allowing
54 + /* '-' or '--' allow to escape the ESSID string, allowing
55 * to set it to the string "any" or "off".
56 * This is a big ugly, but it will do for now */
57 - if(!strcmp(args[i], "-"))
58 + if(!strcmp(args[i], "-") || !strcmp(args[i], "--"))
59 {
60 i++;
61 if(i >= count)
62 @@ -1377,12 +1377,21 @@
63 if (!strcmp(argv[1], "-v") || !strcmp(argv[1], "--version"))
64 goterr = iw_print_version_info("iwconfig");
65 else
66 - /* The device name must be the first argument */
67 - if(argc == 2)
68 - print_info(skfd, argv[1], NULL, 0);
69 - else
70 - /* The other args on the line specify options to be set... */
71 - goterr = set_info(skfd, argv + 2, argc - 2, argv[1]);
72 + {
73 + /* '--' escape device name */
74 + if((argc > 2) && !strcmp(argv[1], "--"))
75 + {
76 + argv++;
77 + argc--;
78 + }
79 +
80 + /* The device name must be the first argument */
81 + if(argc == 2)
82 + print_info(skfd, argv[1], NULL, 0);
83 + else
84 + /* The other args on the line specify options to be set... */
85 + goterr = set_info(skfd, argv + 2, argc - 2, argv[1]);
86 + }
87
88 /* Close the socket. */
89 iw_sockets_close(skfd);
This page took 0.050984 seconds and 5 git commands to generate.