hyperboria / bugs

Peer-to-peer IPv6 networking, secure and near-zero-conf.
153 stars 17 forks source link

build error on IFNAMSIZ TUNInterface_linux.c due to compile option #130

Open plntyk opened 8 years ago

plntyk commented 8 years ago

git checkout and building currently fails on my end:

fails with:

Error: gcc -c -x cpp-output -o build_linux/interface_tuntap_TUNInterface_linux_c.o -std=c99 -Wall -Wextra -Werror -Wno-pointer-sign -pedantic -D linux=1 -D CJD_PACKAGE_VERSION="cjdns-0.3-3823-g7f5caec" -Wno-unused-parameter -D Log_DEBUG -g -D NumberCompress_TYPE=v3x5x8 -D Identity_CHECK=1 -D Allocator_USE_CANARIES=1 -D PARANOIA=1 -DHAS_ETH_INTERFACE=1 -fPIE -fno-stack-protector -fstack-protector-all -Wstack-protector -O3 build_linux/interface_tuntap_TUNInterface_linux_c.o.i

In file included from /usr/include/linux/if.h:31:0, from interface/tuntap/TUNInterface_linux.c:33: /usr/include/linux/hdlc/ioctl.h:73:14: error: ‘IFNAMSIZ’ undeclared here (not in a function) char master[IFNAMSIZ]; /* Name of master FRAD device */

test program w. gcc 6 (on sid with gcc 5+6 too):


#include <stdio.h>
#include <net/if.h>
#include <linux/if.h>

int main(void) {
        printf("IFNAMSIZ: %d",IFNAMSIZ);
        return 0;
}
igran commented 8 years ago

+1 Linux localhost.localdomain 4.5.7-200.fc23.x86_64 #1 SMP Wed Jun 8 17:41:50 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux NAME=Fedora VERSION="23 (Twenty Three)"