/[gentoo-x86]/net-wireless/chillispot/files/chillispot-1.1.0-gcc44.patch
Gentoo

Contents of /net-wireless/chillispot/files/chillispot-1.1.0-gcc44.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download) (as text)
Sat Jul 18 21:17:52 2009 UTC (11 years, 3 months ago) by vostorga
Branch: MAIN
CVS Tags: HEAD
File MIME type: text/x-diff
Added patch to fix compilation with gcc 4.4, fixes bug 277733
(Portage version: 2.1.6.13/cvs/Linux i686)

1 diff -NrU5 chillispot-1.1.0.original/src/tun.c chillispot-1.1.0/src/tun.c
2 --- chillispot-1.1.0.original/src/tun.c 2009-07-18 20:50:38.000000000 +0000
3 +++ chillispot-1.1.0/src/tun.c 2009-07-18 21:06:53.000000000 +0000
4 @@ -364,11 +364,11 @@
5 tun_sifflags(this, IFF_UP | IFF_RUNNING); /* TODO */
6 close(fd);
7 this->addrs++;
8 return 0;
9
10 -#elif defined (__FreeBSD__) defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
11 +#elif defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
12
13 int fd;
14 struct ifaliasreq areq;
15
16 /* TODO: Is this needed on FreeBSD? */
17 @@ -443,11 +443,11 @@
18 ifr.ifr_dstaddr.sa_family = AF_INET;
19
20 #if defined(__linux__)
21 ifr.ifr_netmask.sa_family = AF_INET;
22
23 -#elif defined(__FreeBSD__) defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
24 +#elif defined(__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
25 ((struct sockaddr_in *) &ifr.ifr_addr)->sin_len =
26 sizeof (struct sockaddr_in);
27 ((struct sockaddr_in *) &ifr.ifr_dstaddr)->sin_len =
28 sizeof (struct sockaddr_in);
29 #endif
30 @@ -495,11 +495,11 @@
31 this->netmask.s_addr = netmask->s_addr;
32 #if defined(__linux__)
33 ((struct sockaddr_in *) &ifr.ifr_netmask)->sin_addr.s_addr =
34 netmask->s_addr;
35
36 -#elif defined(__FreeBSD__) defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
37 +#elif defined(__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
38 ((struct sockaddr_in *) &ifr.ifr_addr)->sin_addr.s_addr =
39 netmask->s_addr;
40
41 #elif defined(__sun__)
42 ((struct sockaddr_in *) &ifr.ifr_addr)->sin_addr.s_addr =
43 @@ -583,11 +583,11 @@
44 }
45 }
46 close(fd);
47 return 0;
48
49 -#elif defined(__FreeBSD__) defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
50 +#elif defined(__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
51
52 struct {
53 struct rt_msghdr rt;
54 struct sockaddr_in dst;
55 struct sockaddr_in gate;
56 @@ -672,11 +672,11 @@
57 {
58
59 #if defined(__linux__)
60 struct ifreq ifr;
61
62 -#elif defined(__FreeBSD__) defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
63 +#elif defined(__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
64 char devname[IFNAMSIZ+5]; /* "/dev/" + ifname */
65 int devnum;
66 struct ifaliasreq areq;
67 int fd;
68
69 @@ -720,11 +720,11 @@
70 (*tun)->devname[IFNAMSIZ] = 0;
71
72 ioctl((*tun)->fd, TUNSETNOCSUM, 1); /* Disable checksums */
73 return 0;
74
75 -#elif defined(__FreeBSD__) defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
76 +#elif defined(__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
77
78 /* Find suitable device */
79 for (devnum = 0; devnum < 255; devnum++) { /* TODO 255 */
80 snprintf(devname, sizeof(devname), "/dev/tun%d", devnum);
81 devname[sizeof(devname)] = 0;

  ViewVC Help
Powered by ViewVC 1.1.20