Thanks, I'll include the patch in the next revision.

El día 10/03/2007 a 15:44 Cyril Brulebois escribió...

> Package: chillispot
> Severity: important
> Tags: patch
> 
> Hi,
> 
> currently your package FTBFS on GNU/kFreeBSD with the following error:
> > if i486-kfreebsd-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I..    -D_GNU_SOURCE 
> > -fno-builtin -ansi -DSBINDIR='"/usr/sbin"'  -g -O2 -MT tun.o -MD -MP -MF 
> > ".deps/tun.Tpo" -c -o tun.o tun.c; \
> >     then mv -f ".deps/tun.Tpo" ".deps/tun.Po"; else rm -f ".deps/tun.Tpo"; 
> > exit 1; fi
> > tun.c:64:2: error: #error "Unknown platform!"
> > In file included from tun.c:68:
> > tun.h:48: error: 'IFNAMSIZ' undeclared here (not in a function)
> > tun.c: In function 'tun_sifflags':
> > tun.c:115: error: storage size of 'ifr' isn't known
> > tun.c:126: error: invalid application of 'sizeof' to incomplete type 
> > 'struct ifreq' 
> > tun.c:395:2: error: #error "Unknown platform!"
> > tun.c: In function 'tun_setaddr':
> > tun.c:406: error: storage size of 'ifr' isn't known
> > tun.c:436: error: invalid application of 'sizeof' to incomplete type 
> > 'struct ifreq' 
> > tun.c:454: error: invalid application of 'sizeof' to incomplete type 
> > 'struct ifreq' 
> > tun.c:476:2: error: #error "Unknown platform!"
> > tun.c:479: error: invalid application of 'sizeof' to incomplete type 
> > 'struct ifreq' 
> > tun.c:495: error: 'IFF_UP' undeclared (first use in this function)
> > tun.c:495: error: (Each undeclared identifier is reported only once
> > tun.c:495: error: for each function it appears in.)
> > tun.c:495: error: 'IFF_RUNNING' undeclared (first use in this function)
> > tun.c:617:2: error: #error "Unknown platform!"
> > tun.c:658:2: error: #error "Unknown platform!"
> > tun.c:792:2: error: #error "Unknown platform!"
> > make[3]: *** [tun.o] Error 1
> 
> Full build logs are available at
> <http://experimental.ftbfs.de/build.php?arch=kfreebsd-i386&pkg=chillispot>.
> 
> Please find attached a patch which allows your package to build OK on
> GNU/kFreeBSD.
> 
> Cheers,
> 

> --- chillispot-1.0/src/dhcp.c 2007-03-10 22:24:20.817881000 +0100
> +++ chillispot-1.0/src/dhcp.c 2007-03-10 22:25:16.000000000 +0100
> @@ -46,7 +46,7 @@
>  #include <linux/if_packet.h>
>  #include <linux/if_ether.h>
>  
> -#elif defined (__FreeBSD__)  || defined (__APPLE__)
> +#elif defined (__FreeBSD__)  || defined (__APPLE__) || 
> defined(__FreeBSD_kernel__)
>  #include <net/if.h>
>  #include <net/bpf.h>
>  #include <net/if_dl.h>
> @@ -254,7 +254,7 @@
>  #if defined(__linux__)
>    ifr.ifr_netmask.sa_family = AF_INET;
>  
> -#elif defined(__FreeBSD__) || defined (__APPLE__)
> +#elif defined(__FreeBSD__) || defined (__APPLE__) || 
> defined(__FreeBSD_kernel__)
>    ((struct sockaddr_in *) &ifr.ifr_addr)->sin_len = 
>      sizeof (struct sockaddr_in);
>    ((struct sockaddr_in *) &ifr.ifr_dstaddr)->sin_len = 
> @@ -303,7 +303,7 @@
>      ((struct sockaddr_in *) &ifr.ifr_netmask)->sin_addr.s_addr = 
>        netmask->s_addr;
>  
> -#elif defined(__FreeBSD__) || defined (__APPLE__)
> +#elif defined(__FreeBSD__) || defined (__APPLE__) || 
> defined(__FreeBSD_kernel__)
>      ((struct sockaddr_in *) &ifr.ifr_addr)->sin_addr.s_addr = 
>        netmask->s_addr;
>  
> @@ -329,7 +329,7 @@
>  
>    /* TODO: How does it work on Solaris? */
>  
> -#if defined(__FreeBSD__) || defined (__APPLE__)
> +#if defined(__FreeBSD__) || defined (__APPLE__) || 
> defined(__FreeBSD_kernel__)
>    (void)dhcp_sifflags(devname, IFF_UP | IFF_RUNNING);  /* TODO */
>    /*return tun_addroute(this, addr, addr, netmask);*/
>  #else
> @@ -447,7 +447,7 @@
>    return fd;
>  }
>  
> -#elif defined (__FreeBSD__) || defined (__APPLE__)
> +#elif defined (__FreeBSD__) || defined (__APPLE__) || 
> defined(__FreeBSD_kernel__)
>  
>  
>  int dhcp_getmac(const char *ifname, char *macaddr) {
> @@ -630,7 +630,7 @@
>           fd, length);
>      return -1;
>    }
> -#elif defined(__FreeBSD__) || defined (__APPLE__)
> +#elif defined(__FreeBSD__) || defined (__APPLE__) || 
> defined(__FreeBSD_kernel__)
>    if (write(fd, packet, length) < 0) {
>      sys_err(LOG_ERR, __FILE__, __LINE__, errno, "write() failed");
>      return -1;
> @@ -1061,7 +1061,7 @@
>        return -1; /* Error reporting done in dhcp_open_eth */
>      }
>  
> -#if defined(__FreeBSD__) || defined (__APPLE__)
> +#if defined(__FreeBSD__) || defined (__APPLE__) || 
> defined(__FreeBSD_kernel__)
>    if (ioctl((*dhcp)->fd, BIOCGBLEN, &blen) < 0) {
>      sys_err(LOG_ERR, __FILE__, __LINE__, errno,"ioctl() failed!");
>    }
> @@ -2541,7 +2541,7 @@
>  
>  
>  
> -#if defined(__FreeBSD__) || defined (__APPLE__)
> +#if defined(__FreeBSD__) || defined (__APPLE__) || 
> defined(__FreeBSD_kernel__)
>  
>  int dhcp_receive(struct dhcp_t *this) {
>    /*
> --- chillispot-1.0/src/tun.c  2007-03-10 22:22:20.646192000 +0100
> +++ chillispot-1.0/src/tun.c  2007-03-10 22:23:58.000000000 +0100
> @@ -46,7 +46,7 @@
>  #include <linux/netlink.h>
>  #include <linux/rtnetlink.h>
>  
> -#elif defined (__FreeBSD__)
> +#elif defined (__FreeBSD__) || defined(__FreeBSD_kernel__)
>  #include <net/if.h>
>  #include <net/if_tun.h>
>  
> @@ -334,7 +334,7 @@
>    this->addrs++;
>    return 0;
>  
> -#elif defined (__FreeBSD__) || defined (__APPLE__)
> +#elif defined (__FreeBSD__) || defined (__APPLE__) || 
> defined(__FreeBSD_kernel__)
>  
>    int fd;
>    struct ifaliasreq      areq;
> @@ -413,7 +413,7 @@
>  #if defined(__linux__)
>    ifr.ifr_netmask.sa_family = AF_INET;
>  
> -#elif defined(__FreeBSD__) || defined (__APPLE__)
> +#elif defined(__FreeBSD__) || defined (__APPLE__) || 
> defined(__FreeBSD_kernel__)
>    ((struct sockaddr_in *) &ifr.ifr_addr)->sin_len = 
>      sizeof (struct sockaddr_in);
>    ((struct sockaddr_in *) &ifr.ifr_dstaddr)->sin_len = 
> @@ -465,7 +465,7 @@
>      ((struct sockaddr_in *) &ifr.ifr_netmask)->sin_addr.s_addr = 
>        netmask->s_addr;
>  
> -#elif defined(__FreeBSD__) || defined (__APPLE__)
> +#elif defined(__FreeBSD__) || defined (__APPLE__) || 
> defined(__FreeBSD_kernel__)
>      ((struct sockaddr_in *) &ifr.ifr_addr)->sin_addr.s_addr = 
>        netmask->s_addr;
>  
> @@ -494,7 +494,7 @@
>  
>    tun_sifflags(this, IFF_UP | IFF_RUNNING);
>  
> -#if defined(__FreeBSD__) || defined (__APPLE__)
> +#if defined(__FreeBSD__) || defined (__APPLE__) || 
> defined(__FreeBSD_kernel__)
>    tun_addroute(this, dstaddr, addr, netmask);
>    this->routes = 1;
>  #endif
> @@ -553,7 +553,7 @@
>    close(fd);
>    return 0;
>    
> -#elif defined(__FreeBSD__) || defined (__APPLE__)
> +#elif defined(__FreeBSD__) || defined (__APPLE__) || 
> defined(__FreeBSD_kernel__)
>  
>  struct {
>    struct rt_msghdr rt;
> @@ -642,7 +642,7 @@
>  #if defined(__linux__)
>    struct ifreq ifr;
>  
> -#elif defined(__FreeBSD__) || defined (__APPLE__)
> +#elif defined(__FreeBSD__) || defined (__APPLE__) || 
> defined(__FreeBSD_kernel__)
>    char devname[IFNAMSIZ+5]; /* "/dev/" + ifname */
>    int devnum;
>    struct ifaliasreq areq;
> @@ -690,7 +690,7 @@
>    ioctl((*tun)->fd, TUNSETNOCSUM, 1); /* Disable checksums */
>    return 0;
>    
> -#elif defined(__FreeBSD__) || defined (__APPLE__)
> +#elif defined(__FreeBSD__) || defined (__APPLE__) || 
> defined(__FreeBSD_kernel__)
>  
>    /* Find suitable device */
>    for (devnum = 0; devnum < 255; devnum++) { /* TODO 255 */ 
> @@ -822,7 +822,7 @@
>  int tun_decaps(struct tun_t *this)
>  {
>  
> -#if defined(__linux__) || defined (__FreeBSD__) || defined (__APPLE__)
> +#if defined(__linux__) || defined (__FreeBSD__) || defined (__APPLE__) || 
> defined (__FreeBSD_kernel__)
>  
>    unsigned char buffer[PACKET_MAX];
>    int status;
> @@ -863,7 +863,7 @@
>  int tun_encaps(struct tun_t *tun, void *pack, unsigned len)
>  {
>  
> -#if defined(__linux__) || defined (__FreeBSD__) || defined (__APPLE__)
> +#if defined(__linux__) || defined (__FreeBSD__) || defined (__APPLE__) || 
> defined(__FreeBSD_kernel__)
>  
>    return write(tun->fd, pack, len);
>  
> --- chillispot-1.0/src/chilli.c       2007-03-10 22:26:59.387319000 +0100
> +++ chillispot-1.0/src/chilli.c       2007-03-10 22:27:27.000000000 +0100
> @@ -27,7 +27,7 @@
>  #include <linux/netlink.h> 
>  #include <linux/if_ether.h>
>  
> -#elif defined (__FreeBSD__)  || defined (__APPLE__)
> +#elif defined (__FreeBSD__)  || defined (__APPLE__) || 
> defined(__FreeBSD_kernel__)
>  #include <netinet/in.h>
>  #endif
>  
> @@ -3625,7 +3625,7 @@
>      if (dhcp) FD_SET(dhcp->fd, &fds);
>      if ((dhcp) && (dhcp->arp_fd)) FD_SET(dhcp->arp_fd, &fds);
>      if ((dhcp) && (dhcp->eapol_fd)) FD_SET(dhcp->eapol_fd, &fds);
> -#elif defined (__FreeBSD__)  || defined (__APPLE__)
> +#elif defined (__FreeBSD__)  || defined (__APPLE__) || 
> defined(__FreeBSD_kernel__)
>      if (dhcp) FD_SET(dhcp->fd, &fds);
>  #endif
>      if (radius->fd != -1) FD_SET(radius->fd, &fds);
> @@ -3683,7 +3683,7 @@
>       sys_err(LOG_ERR, __FILE__, __LINE__, 0,
>               "dhcp_eapol_ind() failed!");
>        }
> -#elif defined (__FreeBSD__)  || defined (__APPLE__)
> +#elif defined (__FreeBSD__)  || defined (__APPLE__) || 
> defined(__FreeBSD_kernel__)
>        if ((dhcp) && FD_ISSET(dhcp->fd, &fds) && 
>         dhcp_receive(dhcp) < 0) {
>       sys_err(LOG_ERR, __FILE__, __LINE__, 0,
> --- chillispot-1.0/src/dhcp.h 2007-03-10 22:26:02.960305000 +0100
> +++ chillispot-1.0/src/dhcp.h 2007-03-10 22:26:09.000000000 +0100
> @@ -342,7 +342,7 @@
>    int devflags;         /* Original flags of network interface */
>    unsigned char hwaddr[DHCP_ETH_ALEN]; /* Hardware address of interface */
>    int ifindex;  /* Hardware address of interface */
> -#if defined(__FreeBSD__) || defined (__APPLE__)
> +#if defined(__FreeBSD__) || defined (__APPLE__) || 
> defined(__FreeBSD_kernel__)
>    char *rbuf;
>    int rbuf_max;
>    int rbuf_offset;
> --- chillispot-1.0/src/redir.c        2007-03-10 22:26:59.917808000 +0100
> +++ chillispot-1.0/src/redir.c        2007-03-10 22:27:51.000000000 +0100
> @@ -485,7 +485,7 @@
>    address.sin_family = AF_INET;
>    address.sin_addr.s_addr = addr->s_addr;
>    address.sin_port = htons(port);
> -#if defined(__FreeBSD__)  || defined (__APPLE__)
> +#if defined(__FreeBSD__)  || defined (__APPLE__) || 
> defined(__FreeBSD_kernel__)
>    address.sin_len = sizeof (struct sockaddr_in);
>  #endif
>  


-- 
Rudy Godoy | 0x3433BD21 | http://www.htu.com.pe              ,''`.
http://www.apesol.org  -  http://www.debian.org              : :' :
GPG FP: 0D12 8537 607E 2DF5 4EFB  35A7 550F 1A00 3433 BD21   `. `'
                                                               `-

Attachment: signature.asc
Description: Digital signature

Reply via email to