[packages] chillispot: Add missing logical operator
[openwrt/svn-archive/archive.git] / net / chillispot / patches / 200-gcc_fix.patch
1 diff -Naur chillispot-1.1.0/src/tun.c chillispot-1.1.0.patched/src/tun.c
2 --- chillispot-1.1.0/src/tun.c 2006-09-24 20:48:25.000000000 +0300
3 +++ chillispot-1.1.0.patched/src/tun.c 2009-10-20 02:08:49.000000000 +0300
4 @@ -366,7 +366,7 @@
5 this->addrs++;
6 return 0;
7
8 -#elif defined (__FreeBSD__) defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
9 +#elif defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
10
11 int fd;
12 struct ifaliasreq areq;
13 @@ -445,7 +445,7 @@
14 #if defined(__linux__)
15 ifr.ifr_netmask.sa_family = AF_INET;
16
17 -#elif defined(__FreeBSD__) defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
18 +#elif defined(__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
19 ((struct sockaddr_in *) &ifr.ifr_addr)->sin_len =
20 sizeof (struct sockaddr_in);
21 ((struct sockaddr_in *) &ifr.ifr_dstaddr)->sin_len =
22 @@ -497,7 +497,7 @@
23 ((struct sockaddr_in *) &ifr.ifr_netmask)->sin_addr.s_addr =
24 netmask->s_addr;
25
26 -#elif defined(__FreeBSD__) defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
27 +#elif defined(__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
28 ((struct sockaddr_in *) &ifr.ifr_addr)->sin_addr.s_addr =
29 netmask->s_addr;
30
31 @@ -585,7 +585,7 @@
32 close(fd);
33 return 0;
34
35 -#elif defined(__FreeBSD__) defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
36 +#elif defined(__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
37
38 struct {
39 struct rt_msghdr rt;
40 @@ -674,7 +674,7 @@
41 #if defined(__linux__)
42 struct ifreq ifr;
43
44 -#elif defined(__FreeBSD__) defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
45 +#elif defined(__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
46 char devname[IFNAMSIZ+5]; /* "/dev/" + ifname */
47 int devnum;
48 struct ifaliasreq areq;
49 @@ -722,7 +722,7 @@
50 ioctl((*tun)->fd, TUNSETNOCSUM, 1); /* Disable checksums */
51 return 0;
52
53 -#elif defined(__FreeBSD__) defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
54 +#elif defined(__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
55
56 /* Find suitable device */
57 for (devnum = 0; devnum < 255; devnum++) { /* TODO 255 */