Build of ifenslave with android toolchain

The build took 00h 00m 47s and was NOT successful.

The program in this build is written in the following languages, according to sloccount:

SLOCLanguage
809 ansic
809 total

The process tree of the build process is here.

Several sub-process invocations were improper; see the process tree for details. Summary:

List of Errors

Log

To avoid scrolling, you may jump to the last line of the invocation of makepkg that was used to build this package.

Removed vanilla repositories from pacman.conf and added:
# [tuscan]
# Server = file:///var/cache/pacman/pkg/

CMD: pacman -Syy --noconfirm
# :: Synchronizing package databases...
# downloading tuscan.db...

Copied permanent toolchain into container-local sysroot
# /toolchain_root/arm-linux-androideabi --> /sysroot/arm-linux-androideabi
# /toolchain_root/COPYING3.LIB --> /sysroot/COPYING3.LIB
# /toolchain_root/sysroot --> /sysroot/sysroot
# /toolchain_root/COPYING.RUNTIME --> /sysroot/COPYING.RUNTIME
# /toolchain_root/lib --> /sysroot/lib
# /toolchain_root/SOURCES --> /sysroot/SOURCES
# /toolchain_root/lib64 --> /sysroot/lib64
# /toolchain_root/share --> /sysroot/share
# /toolchain_root/bin --> /sysroot/bin
# /toolchain_root/COPYING --> /sysroot/COPYING
# /toolchain_root/COPYING3 --> /sysroot/COPYING3
# /toolchain_root/COPYING.LIB --> /sysroot/COPYING.LIB
# /toolchain_root/include --> /sysroot/include
# /toolchain_root/libexec --> /sysroot/libexec

CMD: sudo -u tuscan PATH=/sysroot/bin:/sysroot/libexec/gcc/arm-linux-androideabi/4.8:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin CC=arm-linux-androideabi-gcc CXX=arm-linux-androideabi-g++ red makepkg --noextract --syncdeps --skipinteg --skippgpcheck --skipchecksums --noconfirm --nocolor --log --noprogressbar --nocheck
# ==> Making package: ifenslave 1.1.0-8 (Tue Apr 4 21:21:20 UTC 2017)
# ==> Checking runtime dependencies...
# ==> Checking buildtime dependencies...
# ==> WARNING: Using existing $srcdir/ tree
# ==> Starting build()...
# cc1: error: no include path in which to search for stdc-predef.h
# ifenslave.c:150:20: error: no include path in which to search for unistd.h
# #include
# ^
# ifenslave.c:151:20: error: no include path in which to search for stdlib.h
# #include
# ^
# ifenslave.c:152:19: error: no include path in which to search for stdio.h
# #include
# ^
# ifenslave.c:153:19: error: no include path in which to search for ctype.h
# #include
# ^
# ifenslave.c:154:20: error: no include path in which to search for string.h
# #include
# ^
# ifenslave.c:155:19: error: no include path in which to search for errno.h
# #include
# ^
# ifenslave.c:156:19: error: no include path in which to search for fcntl.h
# #include
# ^
# ifenslave.c:157:20: error: no include path in which to search for getopt.h
# #include
# ^
# ifenslave.c:158:23: error: no include path in which to search for sys/types.h
# #include
# ^
# ifenslave.c:159:24: error: no include path in which to search for sys/socket.h
# #include
# ^
# ifenslave.c:160:23: error: no include path in which to search for sys/ioctl.h
# #include
# ^
# ifenslave.c:161:22: error: no include path in which to search for linux/if.h
# #include
# ^
# ifenslave.c:162:24: error: no include path in which to search for net/if_arp.h
# #include
# ^
# ifenslave.c:163:28: error: no include path in which to search for linux/if_ether.h
# #include
# ^
# ifenslave.c:164:30: error: no include path in which to search for linux/if_bonding.h
# #include
# ^
# ifenslave.c:165:27: error: no include path in which to search for linux/sockios.h
# #include
# ^
# ifenslave.c:168:1: error: unknown type name '__uint32_t'
# typedef __uint32_t u32; /* ditto */
# ^
# ifenslave.c:169:1: error: unknown type name '__uint16_t'
# typedef __uint16_t u16; /* ditto */
# ^
# ifenslave.c:170:1: error: unknown type name '__uint8_t'
# typedef __uint8_t u8; /* ditto */
# ^
# ifenslave.c:171:27: error: no include path in which to search for linux/ethtool.h
# #include
# ^
# ifenslave.c:173:15: error: array type has incomplete element type
# struct option longopts[] = {
# ^
# ifenslave.c:212:38: error: 'SIOCGIFMTU' undeclared here (not in a function)
# {&master_mtu, "SIOCGIFMTU", SIOCGIFMTU},
# ^
# ifenslave.c:213:38: error: 'SIOCGIFFLAGS' undeclared here (not in a function)
# {&master_flags, "SIOCGIFFLAGS", SIOCGIFFLAGS},
# ^
# ifenslave.c:214:38: error: 'SIOCGIFHWADDR' undeclared here (not in a function)
# {&master_hwaddr, "SIOCGIFHWADDR", SIOCGIFHWADDR},
# ^
# ifenslave.c:215:3: error: 'NULL' undeclared here (not in a function)
# {NULL, "", 0}
# ^
# ifenslave.c:219:2: error: initializer element is not constant
# {&slave_mtu, "SIOCGIFMTU", SIOCGIFMTU},
# ^
# ifenslave.c:219:2: error: (near initialization for 'slave_ifra[0].req_type')
# ifenslave.c:220:2: error: initializer element is not constant
# {&slave_flags, "SIOCGIFFLAGS", SIOCGIFFLAGS},
# ^
# ifenslave.c:220:2: error: (near initialization for 'slave_ifra[1].req_type')
# ifenslave.c:221:2: error: initializer element is not constant
# {&slave_hwaddr, "SIOCGIFHWADDR", SIOCGIFHWADDR},
# ^
# ifenslave.c:221:2: error: (near initialization for 'slave_ifra[2].req_type')
# ifenslave.c:222:2: error: initializer element is not constant
# {NULL, "", 0}
# ^
# ifenslave.c:222:2: error: (near initialization for 'slave_ifra[3].req_ifr')
# ifenslave.c:229:58: warning: 'struct sockaddr' declared inside parameter list [enabled by default]
# static int set_master_hwaddr(char *master_ifname, struct sockaddr *hwaddr);
# ^
# ifenslave.c:229:58: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
# ifenslave.c:230:56: warning: 'struct sockaddr' declared inside parameter list [enabled by default]
# static int set_slave_hwaddr(char *slave_ifname, struct sockaddr *hwaddr);
# ^
# ifenslave.c: In function 'main':
# ifenslave.c:251:2: warning: implicit declaration of function 'getopt_long' [-Wimplicit-function-declaration]
# while ((c = getopt_long(argc, argv, "acdfhuvV", longopts, 0)) != EOF) {
# ^
# ifenslave.c:251:67: error: 'EOF' undeclared (first use in this function)
# while ((c = getopt_long(argc, argv, "acdfhuvV", longopts, 0)) != EOF) {
# ^
# ifenslave.c:251:67: note: each undeclared identifier is reported only once for each function it appears in
# ifenslave.c:251:64: warning: comparison between pointer and integer [enabled by default]
# while ((c = getopt_long(argc, argv, "acdfhuvV", longopts, 0)) != EOF) {
# ^
# ifenslave.c:263:4: warning: implicit declaration of function 'fprintf' [-Wimplicit-function-declaration]
# fprintf(stderr, "%s", usage_msg);
# ^
# ifenslave.c:263:4: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
# ifenslave.c:263:12: error: 'stderr' undeclared (first use in this function)
# fprintf(stderr, "%s", usage_msg);
# ^
# ifenslave.c:271:3: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
# fprintf(stderr, "%s", usage_msg);
# ^
# ifenslave.c:277:3: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
# printf("%s", version);
# ^
# ifenslave.c:277:3: warning: incompatible implicit declaration of built-in function 'printf' [enabled by default]
# ifenslave.c:285:3: warning: incompatible implicit declaration of built-in function 'printf' [enabled by default]
# printf("%s", usage_msg);
# ^
# ifenslave.c:291:3: warning: incompatible implicit declaration of built-in function 'printf' [enabled by default]
# printf("%s", usage_msg);
# ^
# ifenslave.c:298:2: warning: implicit declaration of function 'socket' [-Wimplicit-function-declaration]
# if ((skfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
# ^
# ifenslave.c:298:21: error: 'AF_INET' undeclared (first use in this function)
# if ((skfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
# ^
# ifenslave.c:298:30: error: 'SOCK_DGRAM' undeclared (first use in this function)
# if ((skfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
# ^
# ifenslave.c:299:3: warning: implicit declaration of function 'perror' [-Wimplicit-function-declaration]
# perror("socket");
# ^
# ifenslave.c:305:7: error: 'optind' undeclared (first use in this function)
# if (optind == argc) {
# ^
# ifenslave.c:305:14: warning: comparison between pointer and integer [enabled by default]
# if (optind == argc) {
# ^
# ifenslave.c:312:4: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
# fprintf(stderr, "%s", usage_msg);
# ^
# ifenslave.c:319:13: error: invalid operands to binary + (have 'char **' and 'struct dev_ifr *')
# spp = argv + optind;
# ^
# ifenslave.c:319:6: warning: assignment from incompatible pointer type [enabled by default]
# spp = argv + optind;
# ^
# ifenslave.c:322:20: warning: comparison of distinct pointer types lacks a cast [enabled by default]
# if (master_ifname == NULL) {
# ^
# ifenslave.c:323:3: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
# fprintf(stderr, "%s", usage_msg);
# ^
# ifenslave.c:331:3: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
# fprintf(stderr,
# ^
# ifenslave.c:340:19: warning: comparison of distinct pointer types lacks a cast [enabled by default]
# if (slave_ifname == NULL) {
# ^
# ifenslave.c:342:4: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
# fprintf(stderr, "%s", usage_msg);
# ^
# ifenslave.c:357:3: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
# fprintf(stderr,
# ^
# ifenslave.c:360:4: warning: implicit declaration of function 'strerror' [-Wimplicit-function-declaration]
# master_ifname, strerror(res));
# ^
# ifenslave.c:360:4: warning: format '%s' expects argument of type 'char *', but argument 4 has type 'int' [-Wformat=]
# ifenslave.c:367:2: error: invalid use of undefined type 'struct ifreq'
# if (!(master_flags.ifr_flags & IFF_MASTER)) {
# ^
# ifenslave.c:367:33: error: 'IFF_MASTER' undeclared (first use in this function)
# if (!(master_flags.ifr_flags & IFF_MASTER)) {
# ^
# ifenslave.c:367:31: error: invalid operands to binary & (have 'struct dev_ifr *' and 'struct dev_ifr *')
# if (!(master_flags.ifr_flags & IFF_MASTER)) {
# ^
# ifenslave.c:368:3: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
# fprintf(stderr,
# ^
# ifenslave.c:377:2: error: invalid use of undefined type 'struct ifreq'
# if (!(master_flags.ifr_flags & IFF_UP)) {
# ^
# ifenslave.c:377:33: error: 'IFF_UP' undeclared (first use in this function)
# if (!(master_flags.ifr_flags & IFF_UP)) {
# ^
# ifenslave.c:377:31: error: invalid operands to binary & (have 'struct dev_ifr *' and 'struct dev_ifr *')
# if (!(master_flags.ifr_flags & IFF_UP)) {
# ^
# ifenslave.c:378:3: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
# fprintf(stderr,
# ^
# ifenslave.c:388:3: error: unknown type name 'sa_family_t'
# sa_family_t master_family = master_hwaddr.ifr_hwaddr.sa_family;
# ^
# ifenslave.c:388:3: error: invalid use of undefined type 'struct ifreq'
# ifenslave.c:388:55: error: request for member 'sa_family' in something not a structure or union
# sa_family_t master_family = master_hwaddr.ifr_hwaddr.sa_family;
# ^
# ifenslave.c:388:31: warning: initialization makes integer from pointer without a cast [enabled by default]
# sa_family_t master_family = master_hwaddr.ifr_hwaddr.sa_family;
# ^
# ifenslave.c:390:4: error: invalid use of undefined type 'struct ifreq'
# (unsigned char *)master_hwaddr.ifr_hwaddr.sa_data;
# ^
# ifenslave.c:390:45: error: request for member 'sa_data' in something not a structure or union
# (unsigned char *)master_hwaddr.ifr_hwaddr.sa_data;
# ^
# ifenslave.c:394:4: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
# fprintf(stderr,
# ^
# ifenslave.c:242:3: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
# fprintf(stderr, fmt, ## args )
# ^
# ifenslave.c:415:4: note: in expansion of macro 'v_print'
# v_print("current hardware address of master '%s' "
# ^
# ifenslave.c:431:4: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
# fprintf(stderr,
# ^
# ifenslave.c:439:4: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
# fprintf(stderr,
# ^
# ifenslave.c:453:6: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
# fprintf(stderr,
# ^
# ifenslave.c:462:6: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
# fprintf(stderr,
# ^
# ifenslave.c:474:6: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
# fprintf(stderr,
# ^
# ifenslave.c:478:7: warning: format '%s' expects argument of type 'char *', but argument 4 has type 'int' [-Wformat=]
# slave_ifname, strerror(rv));
# ^
# ifenslave.c:484:6: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
# fprintf(stderr,
# ^
# ifenslave.c:491:36: warning: comparison of distinct pointer types lacks a cast [enabled by default]
# } while ((slave_ifname = *spp++) != NULL);
# ^
# ifenslave.c:496:3: warning: implicit declaration of function 'close' [-Wimplicit-function-declaration]
# close(skfd);
# ^
# ifenslave.c: In function 'if_getconfig':
# ifenslave.c:507:15: error: storage size of 'ifr' isn't known
# struct ifreq ifr;
# ^
# ifenslave.c:509:18: error: storage size of 'dstaddr' isn't known
# struct sockaddr dstaddr, broadaddr, netmask;
# ^
# ifenslave.c:509:27: error: storage size of 'broadaddr' isn't known
# struct sockaddr dstaddr, broadaddr, netmask;
# ^
# ifenslave.c:509:38: error: storage size of 'netmask' isn't known
# struct sockaddr dstaddr, broadaddr, netmask;
# ^
# ifenslave.c:512:2: warning: implicit declaration of function 'strcpy' [-Wimplicit-function-declaration]
# strcpy(ifr.ifr_name, ifname);
# ^
# ifenslave.c:512:2: warning: incompatible implicit declaration of built-in function 'strcpy' [enabled by default]
# ifenslave.c:512:12: error: request for member 'ifr_name' in something not a structure or union
# strcpy(ifr.ifr_name, ifname);
# ^
# ifenslave.c:512:2: warning: passing argument 1 of 'strcpy' from incompatible pointer type [enabled by default]
# strcpy(ifr.ifr_name, ifname);
# ^
# ifenslave.c:512:2: note: expected 'char *' but argument is of type 'struct dev_ifr *'
# ifenslave.c:513:2: warning: implicit declaration of function 'ioctl' [-Wimplicit-function-declaration]
# if (ioctl(skfd, SIOCGIFFLAGS, &ifr) < 0)
# ^
# ifenslave.c:515:17: error: request for member 'ifr_flags' in something not a structure or union
# mif_flags = ifr.ifr_flags;
# ^
# ifenslave.c:515:12: warning: assignment makes integer from pointer without a cast [enabled by default]
# mif_flags = ifr.ifr_flags;
# ^
# ifenslave.c:516:2: warning: incompatible implicit declaration of built-in function 'printf' [enabled by default]
# printf("The result of SIOCGIFFLAGS on %s is %x.\n",
# ^
# ifenslave.c:517:20: error: request for member 'ifr_flags' in something not a structure or union
# ifname, ifr.ifr_flags);
# ^
# ifenslave.c:517:9: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'struct dev_ifr *' [-Wformat=]
# ifname, ifr.ifr_flags);
# ^
# ifenslave.c:519:12: error: request for member 'ifr_name' in something not a structure or union
# strcpy(ifr.ifr_name, ifname);
# ^
# ifenslave.c:519:2: warning: passing argument 1 of 'strcpy' from incompatible pointer type [enabled by default]
# strcpy(ifr.ifr_name, ifname);
# ^
# ifenslave.c:519:2: note: expected 'char *' but argument is of type 'struct dev_ifr *'
# ifenslave.c:520:18: error: 'SIOCGIFADDR' undeclared (first use in this function)
# if (ioctl(skfd, SIOCGIFADDR, &ifr) < 0)
# ^
# ifenslave.c:523:12: error: request for member 'ifr_addr' in something not a structure or union
# ifr.ifr_addr.sa_data[0], ifr.ifr_addr.sa_data[1],
# ^
# ifenslave.c:523:21: error: request for member 'sa_data' in something not a structure or union
# ifr.ifr_addr.sa_data[0], ifr.ifr_addr.sa_data[1],
# ^
# ifenslave.c:523:37: error: request for member 'ifr_addr' in something not a structure or union
# ifr.ifr_addr.sa_data[0], ifr.ifr_addr.sa_data[1],
# ^
# ifenslave.c:523:46: error: request for member 'sa_data' in something not a structure or union
# ifr.ifr_addr.sa_data[0], ifr.ifr_addr.sa_data[1],
# ^
# ifenslave.c:524:12: error: request for member 'ifr_addr' in something not a structure or union
# ifr.ifr_addr.sa_data[2], ifr.ifr_addr.sa_data[3]);
# ^
# ifenslave.c:524:21: error: request for member 'sa_data' in something not a structure or union
# ifr.ifr_addr.sa_data[2], ifr.ifr_addr.sa_data[3]);
# ^
# ifenslave.c:524:37: error: request for member 'ifr_addr' in something not a structure or union
# ifr.ifr_addr.sa_data[2], ifr.ifr_addr.sa_data[3]);
# ^
# ifenslave.c:524:46: error: request for member 'sa_data' in something not a structure or union
# ifr.ifr_addr.sa_data[2], ifr.ifr_addr.sa_data[3]);
# ^
# ifenslave.c:524:9: warning: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'struct dev_ifr' [-Wformat=]
# ifr.ifr_addr.sa_data[2], ifr.ifr_addr.sa_data[3]);
# ^
# ifenslave.c:524:9: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'struct dev_ifr' [-Wformat=]
# ifenslave.c:524:9: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'struct dev_ifr' [-Wformat=]
# ifenslave.c:524:9: warning: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'struct dev_ifr' [-Wformat=]
# ifenslave.c:526:12: error: request for member 'ifr_name' in something not a structure or union
# strcpy(ifr.ifr_name, ifname);
# ^
# ifenslave.c:526:2: warning: passing argument 1 of 'strcpy' from incompatible pointer type [enabled by default]
# strcpy(ifr.ifr_name, ifname);
# ^
# ifenslave.c:526:2: note: expected 'char *' but argument is of type 'struct dev_ifr *'
# ifenslave.c:531:31: error: request for member 'ifr_hwaddr' in something not a structure or union
# hwaddr = (unsigned char *)ifr.ifr_hwaddr.sa_data;
# ^
# ifenslave.c:531:42: error: request for member 'sa_data' in something not a structure or union
# hwaddr = (unsigned char *)ifr.ifr_hwaddr.sa_data;
# ^
# ifenslave.c:534:12: error: request for member 'ifr_hwaddr' in something not a structure or union
# ifr.ifr_hwaddr.sa_family, hwaddr[0], hwaddr[1],
# ^
# ifenslave.c:534:23: error: request for member 'sa_family' in something not a structure or union
# ifr.ifr_hwaddr.sa_family, hwaddr[0], hwaddr[1],
# ^
# ifenslave.c:535:9: warning: format '%d' expects argument of type 'int', but argument 2 has type 'struct dev_ifr *' [-Wformat=]
# hwaddr[2], hwaddr[3], hwaddr[4], hwaddr[5]);
# ^
# ifenslave.c:537:12: error: request for member 'ifr_name' in something not a structure or union
# strcpy(ifr.ifr_name, ifname);
# ^
# ifenslave.c:537:2: warning: passing argument 1 of 'strcpy' from incompatible pointer type [enabled by default]
# strcpy(ifr.ifr_name, ifname);
# ^
# ifenslave.c:537:2: note: expected 'char *' but argument is of type 'struct dev_ifr *'
# ifenslave.c:538:18: error: 'SIOCGIFMETRIC' undeclared (first use in this function)
# if (ioctl(skfd, SIOCGIFMETRIC, &ifr) < 0) {
# ^
# ifenslave.c:541:15: error: request for member 'ifr_metric' in something not a structure or union
# metric = ifr.ifr_metric;
# ^
# ifenslave.c:541:10: warning: assignment makes integer from pointer without a cast [enabled by default]
# metric = ifr.ifr_metric;
# ^
# ifenslave.c:544:12: error: request for member 'ifr_name' in something not a structure or union
# strcpy(ifr.ifr_name, ifname);
# ^
# ifenslave.c:544:2: warning: passing argument 1 of 'strcpy' from incompatible pointer type [enabled by default]
# strcpy(ifr.ifr_name, ifname);
# ^
# ifenslave.c:544:2: note: expected 'char *' but argument is of type 'struct dev_ifr *'
# ifenslave.c:548:12: error: request for member 'ifr_mtu' in something not a structure or union
# mtu = ifr.ifr_mtu;
# ^
# ifenslave.c:548:7: warning: assignment makes integer from pointer without a cast [enabled by default]
# mtu = ifr.ifr_mtu;
# ^
# ifenslave.c:551:12: error: request for member 'ifr_name' in something not a structure or union
# strcpy(ifr.ifr_name, ifname);
# ^
# ifenslave.c:551:2: warning: passing argument 1 of 'strcpy' from incompatible pointer type [enabled by default]
# strcpy(ifr.ifr_name, ifname);
# ^
# ifenslave.c:551:2: note: expected 'char *' but argument is of type 'struct dev_ifr *'
# ifenslave.c:552:18: error: 'SIOCGIFDSTADDR' undeclared (first use in this function)
# if (ioctl(skfd, SIOCGIFDSTADDR, &ifr) < 0) {
# ^
# ifenslave.c:553:3: warning: implicit declaration of function 'memset' [-Wimplicit-function-declaration]
# memset(&dstaddr, 0, sizeof(struct sockaddr));
# ^
# ifenslave.c:553:3: warning: incompatible implicit declaration of built-in function 'memset' [enabled by default]
# ifenslave.c:553:30: error: invalid application of 'sizeof' to incomplete type 'struct sockaddr'
# memset(&dstaddr, 0, sizeof(struct sockaddr));
# ^
# ifenslave.c:553:37: warning: passing argument 3 of 'memset' makes integer from pointer without a cast [enabled by default]
# memset(&dstaddr, 0, sizeof(struct sockaddr));
# ^
# ifenslave.c:553:37: note: expected 'unsigned int' but argument is of type 'struct dev_ifr *'
# ifenslave.c:555:16: error: request for member 'ifr_dstaddr' in something not a structure or union
# dstaddr = ifr.ifr_dstaddr;
# ^
# ifenslave.c:555:3: warning: statement with no effect [-Wunused-value]
# dstaddr = ifr.ifr_dstaddr;
# ^
# ifenslave.c:557:12: error: request for member 'ifr_name' in something not a structure or union
# strcpy(ifr.ifr_name, ifname);
# ^
# ifenslave.c:557:2: warning: passing argument 1 of 'strcpy' from incompatible pointer type [enabled by default]
# strcpy(ifr.ifr_name, ifname);
# ^
# ifenslave.c:557:2: note: expected 'char *' but argument is of type 'struct dev_ifr *'
# ifenslave.c:558:18: error: 'SIOCGIFBRDADDR' undeclared (first use in this function)
# if (ioctl(skfd, SIOCGIFBRDADDR, &ifr) < 0) {
# ^
# ifenslave.c:559:3: warning: incompatible implicit declaration of built-in function 'memset' [enabled by default]
# memset(&broadaddr, 0, sizeof(struct sockaddr));
# ^
# ifenslave.c:559:32: error: invalid application of 'sizeof' to incomplete type 'struct sockaddr'
# memset(&broadaddr, 0, sizeof(struct sockaddr));
# ^
# ifenslave.c:559:39: warning: passing argument 3 of 'memset' makes integer from pointer without a cast [enabled by default]
# memset(&broadaddr, 0, sizeof(struct sockaddr));
# ^
# ifenslave.c:559:39: note: expected 'unsigned int' but argument is of type 'struct dev_ifr *'
# ifenslave.c:561:18: error: request for member 'ifr_broadaddr' in something not a structure or union
# broadaddr = ifr.ifr_broadaddr;
# ^
# ifenslave.c:561:3: warning: statement with no effect [-Wunused-value]
# broadaddr = ifr.ifr_broadaddr;
# ^
# ifenslave.c:563:12: error: request for member 'ifr_name' in something not a structure or union
# strcpy(ifr.ifr_name, ifname);
# ^
# ifenslave.c:563:2: warning: passing argument 1 of 'strcpy' from incompatible pointer type [enabled by default]
# strcpy(ifr.ifr_name, ifname);
# ^
# ifenslave.c:563:2: note: expected 'char *' but argument is of type 'struct dev_ifr *'
# ifenslave.c:564:18: error: 'SIOCGIFNETMASK' undeclared (first use in this function)
# if (ioctl(skfd, SIOCGIFNETMASK, &ifr) < 0) {
# ^
# ifenslave.c:565:3: warning: incompatible implicit declaration of built-in function 'memset' [enabled by default]
# memset(&netmask, 0, sizeof(struct sockaddr));
# ^
# ifenslave.c:565:30: error: invalid application of 'sizeof' to incomplete type 'struct sockaddr'
# memset(&netmask, 0, sizeof(struct sockaddr));
# ^
# ifenslave.c:565:37: warning: passing argument 3 of 'memset' makes integer from pointer without a cast [enabled by default]
# memset(&netmask, 0, sizeof(struct sockaddr));
# ^
# ifenslave.c:565:37: note: expected 'unsigned int' but argument is of type 'struct dev_ifr *'
# ifenslave.c:567:16: error: request for member 'ifr_netmask' in something not a structure or union
# netmask = ifr.ifr_netmask;
# ^
# ifenslave.c:567:3: warning: statement with no effect [-Wunused-value]
# netmask = ifr.ifr_netmask;
# ^
# ifenslave.c:509:38: warning: unused variable 'netmask' [-Wunused-variable]
# struct sockaddr dstaddr, broadaddr, netmask;
# ^
# ifenslave.c:509:27: warning: unused variable 'broadaddr' [-Wunused-variable]
# struct sockaddr dstaddr, broadaddr, netmask;
# ^
# ifenslave.c:509:18: warning: unused variable 'dstaddr' [-Wunused-variable]
# struct sockaddr dstaddr, broadaddr, netmask;
# ^
# ifenslave.c:507:15: warning: unused variable 'ifr' [-Wunused-variable]
# struct ifreq ifr;
# ^
# ifenslave.c: In function 'if_print':
# ifenslave.c:575:16: error: storage size of 'ifc' isn't known
# struct ifconf ifc;
# ^
# ifenslave.c:580:6: error: request for member 'ifc_len' in something not a structure or union
# ifc.ifc_len = sizeof(buff);
# ^
# ifenslave.c:580:3: warning: statement with no effect [-Wunused-value]
# ifc.ifc_len = sizeof(buff);
# ^
# ifenslave.c:581:6: error: request for member 'ifc_buf' in something not a structure or union
# ifc.ifc_buf = buff;
# ^
# ifenslave.c:581:3: warning: statement with no effect [-Wunused-value]
# ifc.ifc_buf = buff;
# ^
# ifenslave.c:582:19: error: 'SIOCGIFCONF' undeclared (first use in this function)
# if (ioctl(skfd, SIOCGIFCONF, &ifc) < 0) {
# ^
# ifenslave.c:587:12: error: request for member 'ifc_req' in something not a structure or union
# ifr = ifc.ifc_req;
# ^
# ifenslave.c:587:7: warning: assignment from incompatible pointer type [enabled by default]
# ifr = ifc.ifc_req;
# ^
# ifenslave.c:588:15: error: request for member 'ifc_len' in something not a structure or union
# for (i = ifc.ifc_len / sizeof(struct ifreq); --i >= 0; ifr++) {
# ^
# ifenslave.c:588:33: error: invalid application of 'sizeof' to incomplete type 'struct ifreq'
# for (i = ifc.ifc_len / sizeof(struct ifreq); --i >= 0; ifr++) {
# ^
# ifenslave.c:588:24: error: invalid operands to binary / (have 'struct dev_ifr *' and 'struct dev_ifr *')
# for (i = ifc.ifc_len / sizeof(struct ifreq); --i >= 0; ifr++) {
# ^
# ifenslave.c:588:10: warning: assignment makes integer from pointer without a cast [enabled by default]
# for (i = ifc.ifc_len / sizeof(struct ifreq); --i >= 0; ifr++) {
# ^
# ifenslave.c:588:61: error: increment of pointer to unknown structure
# for (i = ifc.ifc_len / sizeof(struct ifreq); --i >= 0; ifr++) {
# ^
# ifenslave.c:588:40: error: arithmetic on pointer to an incomplete type
# for (i = ifc.ifc_len / sizeof(struct ifreq); --i >= 0; ifr++) {
# ^
# ifenslave.c:589:24: error: dereferencing pointer to incomplete type
# if (if_getconfig(ifr->ifr_name) < 0) {
# ^
# ifenslave.c:589:24: error: request for member 'ifr_name' in something not a structure or union
# ifenslave.c:589:4: warning: passing argument 1 of 'if_getconfig' from incompatible pointer type [enabled by default]
# if (if_getconfig(ifr->ifr_name) < 0) {
# ^
# ifenslave.c:505:12: note: expected 'char *' but argument is of type 'struct dev_ifr *'
# static int if_getconfig(char *ifname)
# ^
# ifenslave.c:590:5: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
# fprintf(stderr,
# ^
# ifenslave.c:590:13: error: 'stderr' undeclared (first use in this function)
# fprintf(stderr,
# ^
# ifenslave.c:592:9: error: dereferencing pointer to incomplete type
# ifr->ifr_name);
# ^
# ifenslave.c:592:9: error: request for member 'ifr_name' in something not a structure or union
# ifenslave.c:592:6: warning: format '%s' expects argument of type 'char *', but argument 3 has type 'struct dev_ifr *' [-Wformat=]
# ifr->ifr_name);
# ^
# ifenslave.c:596:22: error: 'IFF_UP' undeclared (first use in this function)
# if (((mif_flags & IFF_UP) == 0) && !opt_a) continue;
# ^
# ifenslave.c:596:20: error: invalid operands to binary & (have 'int' and 'struct dev_ifr *')
# if (((mif_flags & IFF_UP) == 0) && !opt_a) continue;
# ^
# ifenslave.c:601:4: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
# fprintf(stderr,
# ^
# ifenslave.c:575:16: warning: unused variable 'ifc' [-Wunused-variable]
# struct ifconf ifc;
# ^
# ifenslave.c: In function 'get_drv_info':
# ifenslave.c:609:15: error: storage size of 'ifr' isn't known
# struct ifreq ifr;
# ^
# ifenslave.c:610:25: error: storage size of 'info' isn't known
# struct ethtool_drvinfo info;
# ^
# ifenslave.c:613:2: warning: incompatible implicit declaration of built-in function 'memset' [enabled by default]
# memset(&ifr, 0, sizeof(ifr));
# ^
# ifenslave.c:613:2: warning: passing argument 3 of 'memset' makes integer from pointer without a cast [enabled by default]
# ifenslave.c:613:2: note: expected 'unsigned int' but argument is of type 'struct dev_ifr *'
# ifenslave.c:614:2: warning: implicit declaration of function 'strncpy' [-Wimplicit-function-declaration]
# strncpy(ifr.ifr_name, master_ifname, IFNAMSIZ);
# ^
# ifenslave.c:614:2: warning: incompatible implicit declaration of built-in function 'strncpy' [enabled by default]
# ifenslave.c:614:13: error: request for member 'ifr_name' in something not a structure or union
# strncpy(ifr.ifr_name, master_ifname, IFNAMSIZ);
# ^
# ifenslave.c:614:39: error: 'IFNAMSIZ' undeclared (first use in this function)
# strncpy(ifr.ifr_name, master_ifname, IFNAMSIZ);
# ^
# ifenslave.c:614:2: warning: passing argument 1 of 'strncpy' from incompatible pointer type [enabled by default]
# strncpy(ifr.ifr_name, master_ifname, IFNAMSIZ);
# ^
# ifenslave.c:614:2: note: expected 'char *' but argument is of type 'struct dev_ifr *'
# ifenslave.c:614:2: warning: passing argument 3 of 'strncpy' makes integer from pointer without a cast [enabled by default]
# ifenslave.c:614:2: note: expected 'unsigned int' but argument is of type 'struct dev_ifr *'
# ifenslave.c:615:5: error: request for member 'ifr_data' in something not a structure or union
# ifr.ifr_data = (caddr_t)&info;
# ^
# ifenslave.c:615:18: error: 'caddr_t' undeclared (first use in this function)
# ifr.ifr_data = (caddr_t)&info;
# ^
# ifenslave.c:615:26: error: invalid operands to binary & (have 'struct dev_ifr *' and 'struct dev_ifr *')
# ifr.ifr_data = (caddr_t)&info;
# ^
# ifenslave.c:615:2: warning: statement with no effect [-Wunused-value]
# ifr.ifr_data = (caddr_t)&info;
# ^
# ifenslave.c:617:6: error: request for member 'cmd' in something not a structure or union
# info.cmd = ETHTOOL_GDRVINFO;
# ^
# ifenslave.c:617:13: error: 'ETHTOOL_GDRVINFO' undeclared (first use in this function)
# info.cmd = ETHTOOL_GDRVINFO;
# ^
# ifenslave.c:617:2: warning: statement with no effect [-Wunused-value]
# info.cmd = ETHTOOL_GDRVINFO;
# ^
# ifenslave.c:618:14: error: request for member 'driver' in something not a structure or union
# strncpy(info.driver, "ifenslave", 32);
# ^
# ifenslave.c:618:2: warning: passing argument 1 of 'strncpy' from incompatible pointer type [enabled by default]
# strncpy(info.driver, "ifenslave", 32);
# ^
# ifenslave.c:618:2: note: expected 'char *' but argument is of type 'struct dev_ifr *'
# ifenslave.c:619:2: warning: implicit declaration of function 'snprintf' [-Wimplicit-function-declaration]
# snprintf(info.fw_version, 32, "%d", BOND_ABI_VERSION);
# ^
# ifenslave.c:619:2: warning: incompatible implicit declaration of built-in function 'snprintf' [enabled by default]
# ifenslave.c:619:15: error: request for member 'fw_version' in something not a structure or union
# snprintf(info.fw_version, 32, "%d", BOND_ABI_VERSION);
# ^
# ifenslave.c:619:38: error: 'BOND_ABI_VERSION' undeclared (first use in this function)
# snprintf(info.fw_version, 32, "%d", BOND_ABI_VERSION);
# ^
# ifenslave.c:619:2: warning: passing argument 1 of 'snprintf' from incompatible pointer type [enabled by default]
# snprintf(info.fw_version, 32, "%d", BOND_ABI_VERSION);
# ^
# ifenslave.c:619:2: note: expected 'char *' but argument is of type 'struct dev_ifr *'
# ifenslave.c:619:2: warning: format '%d' expects argument of type 'int', but argument 4 has type 'struct dev_ifr *' [-Wformat=]
# ifenslave.c:621:18: error: 'SIOCETHTOOL' undeclared (first use in this function)
# if (ioctl(skfd, SIOCETHTOOL, &ifr) < 0) {
# ^
# ifenslave.c:622:7: error: 'errno' undeclared (first use in this function)
# if (errno == EOPNOTSUPP) {
# ^
# ifenslave.c:622:16: error: 'EOPNOTSUPP' undeclared (first use in this function)
# if (errno == EOPNOTSUPP) {
# ^
# ifenslave.c:626:15: warning: assignment makes integer from pointer without a cast [enabled by default]
# saved_errno = errno;
# ^
# ifenslave.c:242:3: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
# fprintf(stderr, fmt, ## args )
# ^
# ifenslave.c:627:3: note: in expansion of macro 'v_print'
# v_print("Master '%s': Error: get bonding info failed %s\n",
# ^
# ifenslave.c:242:11: error: 'stderr' undeclared (first use in this function)
# fprintf(stderr, fmt, ## args )
# ^
# ifenslave.c:627:3: note: in expansion of macro 'v_print'
# v_print("Master '%s': Error: get bonding info failed %s\n",
# ^
# ifenslave.c:627:3: warning: format '%s' expects argument of type 'char *', but argument 4 has type 'int' [-Wformat=]
# ifenslave.c:632:2: warning: implicit declaration of function 'strtoul' [-Wimplicit-function-declaration]
# abi_ver = strtoul(info.fw_version, &endptr, 0);
# ^
# ifenslave.c:632:24: error: request for member 'fw_version' in something not a structure or union
# abi_ver = strtoul(info.fw_version, &endptr, 0);
# ^
# ifenslave.c:242:3: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
# fprintf(stderr, fmt, ## args )
# ^
# ifenslave.c:634:17: note: in expansion of macro 'v_print'
# v_print("Master '%s': Error: got invalid string as an ABI "
# ^
# ifenslave.c:242:3: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
# fprintf(stderr, fmt, ## args )
# ^
# ifenslave.c:641:2: note: in expansion of macro 'v_print'
# v_print("ABI ver is %d\n", abi_ver);
# ^
# ifenslave.c:610:25: warning: unused variable 'info' [-Wunused-variable]
# struct ethtool_drvinfo info;
# ^
# ifenslave.c:609:15: warning: unused variable 'ifr' [-Wunused-variable]
# struct ifreq ifr;
# ^
# ifenslave.c: In function 'change_active':
# ifenslave.c:648:15: error: storage size of 'ifr' isn't known
# struct ifreq ifr;
# ^
# ifenslave.c:651:2: error: invalid use of undefined type 'struct ifreq'
# if (!(slave_flags.ifr_flags & IFF_SLAVE)) {
# ^
# ifenslave.c:651:32: error: 'IFF_SLAVE' undeclared (first use in this function)
# if (!(slave_flags.ifr_flags & IFF_SLAVE)) {
# ^
# ifenslave.c:651:30: error: invalid operands to binary & (have 'struct dev_ifr *' and 'struct dev_ifr *')
# if (!(slave_flags.ifr_flags & IFF_SLAVE)) {
# ^
# ifenslave.c:652:3: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
# fprintf(stderr,
# ^
# ifenslave.c:652:11: error: 'stderr' undeclared (first use in this function)
# fprintf(stderr,
# ^
# ifenslave.c:659:2: warning: incompatible implicit declaration of built-in function 'strncpy' [enabled by default]
# strncpy(ifr.ifr_name, master_ifname, IFNAMSIZ);
# ^
# ifenslave.c:659:13: error: request for member 'ifr_name' in something not a structure or union
# strncpy(ifr.ifr_name, master_ifname, IFNAMSIZ);
# ^
# ifenslave.c:659:39: error: 'IFNAMSIZ' undeclared (first use in this function)
# strncpy(ifr.ifr_name, master_ifname, IFNAMSIZ);
# ^
# ifenslave.c:659:2: warning: passing argument 1 of 'strncpy' from incompatible pointer type [enabled by default]
# strncpy(ifr.ifr_name, master_ifname, IFNAMSIZ);
# ^
# ifenslave.c:659:2: note: expected 'char *' but argument is of type 'struct dev_ifr *'
# ifenslave.c:659:2: warning: passing argument 3 of 'strncpy' makes integer from pointer without a cast [enabled by default]
# ifenslave.c:659:2: note: expected 'unsigned int' but argument is of type 'struct dev_ifr *'
# ifenslave.c:660:13: error: request for member 'ifr_slave' in something not a structure or union
# strncpy(ifr.ifr_slave, slave_ifname, IFNAMSIZ);
# ^
# ifenslave.c:660:2: warning: passing argument 1 of 'strncpy' from incompatible pointer type [enabled by default]
# strncpy(ifr.ifr_slave, slave_ifname, IFNAMSIZ);
# ^
# ifenslave.c:660:2: note: expected 'char *' but argument is of type 'struct dev_ifr *'
# ifenslave.c:660:2: warning: passing argument 3 of 'strncpy' makes integer from pointer without a cast [enabled by default]
# ifenslave.c:660:2: note: expected 'unsigned int' but argument is of type 'struct dev_ifr *'
# ifenslave.c:661:19: error: 'SIOCBONDCHANGEACTIVE' undeclared (first use in this function)
# if ((ioctl(skfd, SIOCBONDCHANGEACTIVE, &ifr) < 0) &&
# ^
# ifenslave.c:662:19: error: 'BOND_CHANGE_ACTIVE_OLD' undeclared (first use in this function)
# (ioctl(skfd, BOND_CHANGE_ACTIVE_OLD, &ifr) < 0)) {
# ^
# ifenslave.c:663:17: error: 'errno' undeclared (first use in this function)
# saved_errno = errno;
# ^
# ifenslave.c:663:15: warning: assignment makes integer from pointer without a cast [enabled by default]
# saved_errno = errno;
# ^
# ifenslave.c:242:3: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
# fprintf(stderr, fmt, ## args )
# ^
# ifenslave.c:664:3: note: in expansion of macro 'v_print'
# v_print("Master '%s': Error: SIOCBONDCHANGEACTIVE failed: "
# ^
# ifenslave.c:664:3: warning: format '%s' expects argument of type 'char *', but argument 4 has type 'int' [-Wformat=]
# ifenslave.c:648:15: warning: unused variable 'ifr' [-Wunused-variable]
# struct ifreq ifr;
# ^
# ifenslave.c: In function 'enslave':
# ifenslave.c:675:15: error: storage size of 'ifr' isn't known
# struct ifreq ifr;
# ^
# ifenslave.c:678:2: error: invalid use of undefined type 'struct ifreq'
# if (slave_flags.ifr_flags & IFF_SLAVE) {
# ^
# ifenslave.c:678:30: error: 'IFF_SLAVE' undeclared (first use in this function)
# if (slave_flags.ifr_flags & IFF_SLAVE) {
# ^
# ifenslave.c:678:28: error: invalid operands to binary & (have 'struct dev_ifr *' and 'struct dev_ifr *')
# if (slave_flags.ifr_flags & IFF_SLAVE) {
# ^
# ifenslave.c:679:3: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
# fprintf(stderr,
# ^
# ifenslave.c:679:11: error: 'stderr' undeclared (first use in this function)
# fprintf(stderr,
# ^
# ifenslave.c:686:2: error: invalid use of undefined type 'struct ifreq'
# res = set_if_down(slave_ifname, slave_flags.ifr_flags);
# ^
# ifenslave.c:686:2: warning: passing argument 2 of 'set_if_down' makes integer from pointer without a cast [enabled by default]
# ifenslave.c:234:12: note: expected 'short int' but argument is of type 'struct dev_ifr *'
# static int set_if_down(char *ifname, short flags);
# ^
# ifenslave.c:688:3: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
# fprintf(stderr,
# ^
# ifenslave.c:702:4: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
# fprintf(stderr,
# ^
# ifenslave.c:709:2: error: invalid use of undefined type 'struct ifreq'
# if (master_mtu.ifr_mtu != slave_mtu.ifr_mtu) {
# ^
# ifenslave.c:709:2: error: invalid use of undefined type 'struct ifreq'
# ifenslave.c:710:3: error: invalid use of undefined type 'struct ifreq'
# res = set_slave_mtu(slave_ifname, master_mtu.ifr_mtu);
# ^
# ifenslave.c:710:3: warning: passing argument 2 of 'set_slave_mtu' makes integer from pointer without a cast [enabled by default]
# ifenslave.c:231:12: note: expected 'int' but argument is of type 'struct dev_ifr *'
# static int set_slave_mtu(char *slave_ifname, int mtu);
# ^
# ifenslave.c:712:4: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
# fprintf(stderr,
# ^
# ifenslave.c:729:13: error: invalid use of undefined type 'struct ifreq'
# &(master_hwaddr.ifr_hwaddr));
# ^
# ifenslave.c:729:13: warning: passing argument 2 of 'set_slave_hwaddr' from incompatible pointer type [enabled by default]
# ifenslave.c:230:12: note: expected 'struct sockaddr *' but argument is of type 'struct dev_ifr (*)[1]'
# static int set_slave_hwaddr(char *slave_ifname, struct sockaddr *hwaddr);
# ^
# ifenslave.c:731:5: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
# fprintf(stderr,
# ^
# ifenslave.c:741:4: error: invalid use of undefined type 'struct ifreq'
# res = set_if_up(slave_ifname, slave_flags.ifr_flags);
# ^
# ifenslave.c:741:4: warning: passing argument 2 of 'set_if_up' makes integer from pointer without a cast [enabled by default]
# ifenslave.c:233:12: note: expected 'short int' but argument is of type 'struct dev_ifr *'
# static int set_if_up(char *ifname, short flags);
# ^
# ifenslave.c:743:5: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
# fprintf(stderr,
# ^
# ifenslave.c:763:4: error: invalid use of undefined type 'struct ifreq'
# res = set_if_down(master_ifname, master_flags.ifr_flags);
# ^
# ifenslave.c:763:4: warning: passing argument 2 of 'set_if_down' makes integer from pointer without a cast [enabled by default]
# ifenslave.c:234:12: note: expected 'short int' but argument is of type 'struct dev_ifr *'
# static int set_if_down(char *ifname, short flags);
# ^
# ifenslave.c:765:5: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
# fprintf(stderr,
# ^
# ifenslave.c:774:6: error: invalid use of undefined type 'struct ifreq'
# &(slave_hwaddr.ifr_hwaddr));
# ^
# ifenslave.c:774:6: warning: passing argument 2 of 'set_master_hwaddr' from incompatible pointer type [enabled by default]
# ifenslave.c:229:12: note: expected 'struct sockaddr *' but argument is of type 'struct dev_ifr (*)[1]'
# static int set_master_hwaddr(char *master_ifname, struct sockaddr *hwaddr);
# ^
# ifenslave.c:776:4: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
# fprintf(stderr,
# ^
# ifenslave.c:787:4: error: invalid use of undefined type 'struct ifreq'
# res = set_if_up(master_ifname, master_flags.ifr_flags);
# ^
# ifenslave.c:787:4: warning: passing argument 2 of 'set_if_up' makes integer from pointer without a cast [enabled by default]
# ifenslave.c:233:12: note: expected 'short int' but argument is of type 'struct dev_ifr *'
# static int set_if_up(char *ifname, short flags);
# ^
# ifenslave.c:789:5: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
# fprintf(stderr,
# ^
# ifenslave.c:801:2: warning: incompatible implicit declaration of built-in function 'strncpy' [enabled by default]
# strncpy(ifr.ifr_name, master_ifname, IFNAMSIZ);
# ^
# ifenslave.c:801:13: error: request for member 'ifr_name' in something not a structure or union
# strncpy(ifr.ifr_name, master_ifname, IFNAMSIZ);
# ^
# ifenslave.c:801:39: error: 'IFNAMSIZ' undeclared (first use in this function)
# strncpy(ifr.ifr_name, master_ifname, IFNAMSIZ);
# ^
# ifenslave.c:801:2: warning: passing argument 1 of 'strncpy' from incompatible pointer type [enabled by default]
# strncpy(ifr.ifr_name, master_ifname, IFNAMSIZ);
# ^
# ifenslave.c:801:2: note: expected 'char *' but argument is of type 'struct dev_ifr *'
# ifenslave.c:801:2: warning: passing argument 3 of 'strncpy' makes integer from pointer without a cast [enabled by default]
# ifenslave.c:801:2: note: expected 'unsigned int' but argument is of type 'struct dev_ifr *'
# ifenslave.c:802:13: error: request for member 'ifr_slave' in something not a structure or union
# strncpy(ifr.ifr_slave, slave_ifname, IFNAMSIZ);
# ^
# ifenslave.c:802:2: warning: passing argument 1 of 'strncpy' from incompatible pointer type [enabled by default]
# strncpy(ifr.ifr_slave, slave_ifname, IFNAMSIZ);
# ^
# ifenslave.c:802:2: note: expected 'char *' but argument is of type 'struct dev_ifr *'
# ifenslave.c:802:2: warning: passing argument 3 of 'strncpy' makes integer from pointer without a cast [enabled by default]
# ifenslave.c:802:2: note: expected 'unsigned int' but argument is of type 'struct dev_ifr *'
# ifenslave.c:803:19: error: 'SIOCBONDENSLAVE' undeclared (first use in this function)
# if ((ioctl(skfd, SIOCBONDENSLAVE, &ifr) < 0) &&
# ^
# ifenslave.c:804:19: error: 'BOND_ENSLAVE_OLD' undeclared (first use in this function)
# (ioctl(skfd, BOND_ENSLAVE_OLD, &ifr) < 0)) {
# ^
# ifenslave.c:805:17: error: 'errno' undeclared (first use in this function)
# saved_errno = errno;
# ^
# ifenslave.c:805:15: warning: assignment makes integer from pointer without a cast [enabled by default]
# saved_errno = errno;
# ^
# ifenslave.c:242:3: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
# fprintf(stderr, fmt, ## args )
# ^
# ifenslave.c:806:3: note: in expansion of macro 'v_print'
# v_print("Master '%s': Error: SIOCBONDENSLAVE failed: %s\n",
# ^
# ifenslave.c:806:3: warning: format '%s' expects argument of type 'char *', but argument 4 has type 'int' [-Wformat=]
# ifenslave.c:819:2: error: invalid use of undefined type 'struct ifreq'
# set_master_hwaddr(master_ifname, &(master_hwaddr.ifr_hwaddr));
# ^
# ifenslave.c:819:2: warning: passing argument 2 of 'set_master_hwaddr' from incompatible pointer type [enabled by default]
# ifenslave.c:229:12: note: expected 'struct sockaddr *' but argument is of type 'struct dev_ifr (*)[1]'
# static int set_master_hwaddr(char *master_ifname, struct sockaddr *hwaddr);
# ^
# ifenslave.c:823:2: error: invalid use of undefined type 'struct ifreq'
# set_slave_hwaddr(slave_ifname, &(slave_hwaddr.ifr_hwaddr));
# ^
# ifenslave.c:823:2: warning: passing argument 2 of 'set_slave_hwaddr' from incompatible pointer type [enabled by default]
# ifenslave.c:230:12: note: expected 'struct sockaddr *' but argument is of type 'struct dev_ifr (*)[1]'
# static int set_slave_hwaddr(char *slave_ifname, struct sockaddr *hwaddr);
# ^
# ifenslave.c:825:2: error: invalid use of undefined type 'struct ifreq'
# set_slave_mtu(slave_ifname, slave_mtu.ifr_mtu);
# ^
# ifenslave.c:825:2: warning: passing argument 2 of 'set_slave_mtu' makes integer from pointer without a cast [enabled by default]
# ifenslave.c:231:12: note: expected 'int' but argument is of type 'struct dev_ifr *'
# static int set_slave_mtu(char *slave_ifname, int mtu);
# ^
# ifenslave.c:675:15: warning: unused variable 'ifr' [-Wunused-variable]
# struct ifreq ifr;
# ^
# ifenslave.c: In function 'release':
# ifenslave.c:831:15: error: storage size of 'ifr' isn't known
# struct ifreq ifr;
# ^
# ifenslave.c:834:2: error: invalid use of undefined type 'struct ifreq'
# if (!(slave_flags.ifr_flags & IFF_SLAVE)) {
# ^
# ifenslave.c:834:32: error: 'IFF_SLAVE' undeclared (first use in this function)
# if (!(slave_flags.ifr_flags & IFF_SLAVE)) {
# ^
# ifenslave.c:834:30: error: invalid operands to binary & (have 'struct dev_ifr *' and 'struct dev_ifr *')
# if (!(slave_flags.ifr_flags & IFF_SLAVE)) {
# ^
# ifenslave.c:835:3: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
# fprintf(stderr,
# ^
# ifenslave.c:835:11: error: 'stderr' undeclared (first use in this function)
# fprintf(stderr,
# ^
# ifenslave.c:842:2: warning: incompatible implicit declaration of built-in function 'strncpy' [enabled by default]
# strncpy(ifr.ifr_name, master_ifname, IFNAMSIZ);
# ^
# ifenslave.c:842:13: error: request for member 'ifr_name' in something not a structure or union
# strncpy(ifr.ifr_name, master_ifname, IFNAMSIZ);
# ^
# ifenslave.c:842:39: error: 'IFNAMSIZ' undeclared (first use in this function)
# strncpy(ifr.ifr_name, master_ifname, IFNAMSIZ);
# ^
# ifenslave.c:842:2: warning: passing argument 1 of 'strncpy' from incompatible pointer type [enabled by default]
# strncpy(ifr.ifr_name, master_ifname, IFNAMSIZ);
# ^
# ifenslave.c:842:2: note: expected 'char *' but argument is of type 'struct dev_ifr *'
# ifenslave.c:842:2: warning: passing argument 3 of 'strncpy' makes integer from pointer without a cast [enabled by default]
# ifenslave.c:842:2: note: expected 'unsigned int' but argument is of type 'struct dev_ifr *'
# ifenslave.c:843:13: error: request for member 'ifr_slave' in something not a structure or union
# strncpy(ifr.ifr_slave, slave_ifname, IFNAMSIZ);
# ^
# ifenslave.c:843:2: warning: passing argument 1 of 'strncpy' from incompatible pointer type [enabled by default]
# strncpy(ifr.ifr_slave, slave_ifname, IFNAMSIZ);
# ^
# ifenslave.c:843:2: note: expected 'char *' but argument is of type 'struct dev_ifr *'
# ifenslave.c:843:2: warning: passing argument 3 of 'strncpy' makes integer from pointer without a cast [enabled by default]
# ifenslave.c:843:2: note: expected 'unsigned int' but argument is of type 'struct dev_ifr *'
# ifenslave.c:844:19: error: 'SIOCBONDRELEASE' undeclared (first use in this function)
# if ((ioctl(skfd, SIOCBONDRELEASE, &ifr) < 0) &&
# ^
# ifenslave.c:845:19: error: 'BOND_RELEASE_OLD' undeclared (first use in this function)
# (ioctl(skfd, BOND_RELEASE_OLD, &ifr) < 0)) {
# ^
# ifenslave.c:846:17: error: 'errno' undeclared (first use in this function)
# saved_errno = errno;
# ^
# ifenslave.c:846:15: warning: assignment makes integer from pointer without a cast [enabled by default]
# saved_errno = errno;
# ^
# ifenslave.c:242:3: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
# fprintf(stderr, fmt, ## args )
# ^
# ifenslave.c:847:3: note: in expansion of macro 'v_print'
# v_print("Master '%s': Error: SIOCBONDRELEASE failed: %s\n",
# ^
# ifenslave.c:847:3: warning: format '%s' expects argument of type 'char *', but argument 4 has type 'int' [-Wformat=]
# ifenslave.c:854:3: error: invalid use of undefined type 'struct ifreq'
# res = set_if_down(slave_ifname, slave_flags.ifr_flags);
# ^
# ifenslave.c:854:3: warning: passing argument 2 of 'set_if_down' makes integer from pointer without a cast [enabled by default]
# ifenslave.c:234:12: note: expected 'short int' but argument is of type 'struct dev_ifr *'
# static int set_if_down(char *ifname, short flags);
# ^
# ifenslave.c:856:4: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
# fprintf(stderr,
# ^
# ifenslave.c:831:15: warning: unused variable 'ifr' [-Wunused-variable]
# struct ifreq ifr;
# ^
# ifenslave.c: In function 'get_if_settings':
# ifenslave.c:875:3: warning: incompatible implicit declaration of built-in function 'strncpy' [enabled by default]
# strncpy(ifra[i].req_ifr->ifr_name, ifname, IFNAMSIZ);
# ^
# ifenslave.c:875:26: error: dereferencing pointer to incomplete type
# strncpy(ifra[i].req_ifr->ifr_name, ifname, IFNAMSIZ);
# ^
# ifenslave.c:875:26: error: request for member 'ifr_name' in something not a structure or union
# ifenslave.c:875:46: error: 'IFNAMSIZ' undeclared (first use in this function)
# strncpy(ifra[i].req_ifr->ifr_name, ifname, IFNAMSIZ);
# ^
# ifenslave.c:875:3: warning: passing argument 1 of 'strncpy' from incompatible pointer type [enabled by default]
# strncpy(ifra[i].req_ifr->ifr_name, ifname, IFNAMSIZ);
# ^
# ifenslave.c:875:3: note: expected 'char *' but argument is of type 'struct dev_ifr *'
# ifenslave.c:875:3: warning: passing argument 3 of 'strncpy' makes integer from pointer without a cast [enabled by default]
# ifenslave.c:875:3: note: expected 'unsigned int' but argument is of type 'struct dev_ifr *'
# ifenslave.c:878:18: error: 'errno' undeclared (first use in this function)
# saved_errno = errno;
# ^
# ifenslave.c:878:16: warning: assignment makes integer from pointer without a cast [enabled by default]
# saved_errno = errno;
# ^
# ifenslave.c:242:3: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
# fprintf(stderr, fmt, ## args )
# ^
# ifenslave.c:879:4: note: in expansion of macro 'v_print'
# v_print("Interface '%s': Error: %s failed: %s\n",
# ^
# ifenslave.c:242:11: error: 'stderr' undeclared (first use in this function)
# fprintf(stderr, fmt, ## args )
# ^
# ifenslave.c:879:4: note: in expansion of macro 'v_print'
# v_print("Interface '%s': Error: %s failed: %s\n",
# ^
# ifenslave.c:879:4: warning: format '%s' expects argument of type 'char *', but argument 5 has type 'int' [-Wformat=]
# ifenslave.c: In function 'get_slave_flags':
# ifenslave.c:894:2: warning: incompatible implicit declaration of built-in function 'strncpy' [enabled by default]
# strncpy(slave_flags.ifr_name, slave_ifname, IFNAMSIZ);
# ^
# ifenslave.c:894:2: error: invalid use of undefined type 'struct ifreq'
# ifenslave.c:894:46: error: 'IFNAMSIZ' undeclared (first use in this function)
# strncpy(slave_flags.ifr_name, slave_ifname, IFNAMSIZ);
# ^
# ifenslave.c:894:2: warning: passing argument 1 of 'strncpy' from incompatible pointer type [enabled by default]
# strncpy(slave_flags.ifr_name, slave_ifname, IFNAMSIZ);
# ^
# ifenslave.c:894:2: note: expected 'char *' but argument is of type 'struct dev_ifr *'
# ifenslave.c:894:2: warning: passing argument 3 of 'strncpy' makes integer from pointer without a cast [enabled by default]
# ifenslave.c:894:2: note: expected 'unsigned int' but argument is of type 'struct dev_ifr *'
# ifenslave.c:897:17: error: 'errno' undeclared (first use in this function)
# saved_errno = errno;
# ^
# ifenslave.c:897:15: warning: assignment makes integer from pointer without a cast [enabled by default]
# saved_errno = errno;
# ^
# ifenslave.c:242:3: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
# fprintf(stderr, fmt, ## args )
# ^
# ifenslave.c:898:3: note: in expansion of macro 'v_print'
# v_print("Slave '%s': Error: SIOCGIFFLAGS failed: %s\n",
# ^
# ifenslave.c:242:11: error: 'stderr' undeclared (first use in this function)
# fprintf(stderr, fmt, ## args )
# ^
# ifenslave.c:898:3: note: in expansion of macro 'v_print'
# v_print("Slave '%s': Error: SIOCGIFFLAGS failed: %s\n",
# ^
# ifenslave.c:898:3: warning: format '%s' expects argument of type 'char *', but argument 4 has type 'int' [-Wformat=]
# ifenslave.c:242:3: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
# fprintf(stderr, fmt, ## args )
# ^
# ifenslave.c:901:3: note: in expansion of macro 'v_print'
# v_print("Slave %s: flags %04X.\n",
# ^
# ifenslave.c:901:3: error: invalid use of undefined type 'struct ifreq'
# ifenslave.c:901:3: warning: format '%X' expects argument of type 'unsigned int', but argument 4 has type 'struct dev_ifr *' [-Wformat=]
# ifenslave.c: At top level:
# ifenslave.c:908:58: warning: 'struct sockaddr' declared inside parameter list [enabled by default]
# static int set_master_hwaddr(char *master_ifname, struct sockaddr *hwaddr)
# ^
# ifenslave.c:908:12: error: conflicting types for 'set_master_hwaddr'
# static int set_master_hwaddr(char *master_ifname, struct sockaddr *hwaddr)
# ^
# ifenslave.c:229:12: note: previous declaration of 'set_master_hwaddr' was here
# static int set_master_hwaddr(char *master_ifname, struct sockaddr *hwaddr);
# ^
# ifenslave.c: In function 'set_master_hwaddr':
# ifenslave.c:910:47: error: dereferencing pointer to incomplete type
# unsigned char *addr = (unsigned char *)hwaddr->sa_data;
# ^
# ifenslave.c:910:47: error: request for member 'sa_data' in something not a structure or union
# ifenslave.c:911:15: error: storage size of 'ifr' isn't known
# struct ifreq ifr;
# ^
# ifenslave.c:914:2: warning: incompatible implicit declaration of built-in function 'strncpy' [enabled by default]
# strncpy(ifr.ifr_name, master_ifname, IFNAMSIZ);
# ^
# ifenslave.c:914:13: error: request for member 'ifr_name' in something not a structure or union
# strncpy(ifr.ifr_name, master_ifname, IFNAMSIZ);
# ^
# ifenslave.c:914:39: error: 'IFNAMSIZ' undeclared (first use in this function)
# strncpy(ifr.ifr_name, master_ifname, IFNAMSIZ);
# ^
# ifenslave.c:914:2: warning: passing argument 1 of 'strncpy' from incompatible pointer type [enabled by default]
# strncpy(ifr.ifr_name, master_ifname, IFNAMSIZ);
# ^
# ifenslave.c:914:2: note: expected 'char *' but argument is of type 'struct dev_ifr *'
# ifenslave.c:914:2: warning: passing argument 3 of 'strncpy' makes integer from pointer without a cast [enabled by default]
# ifenslave.c:914:2: note: expected 'unsigned int' but argument is of type 'struct dev_ifr *'
# ifenslave.c:915:2: warning: implicit declaration of function 'memcpy' [-Wimplicit-function-declaration]
# memcpy(&(ifr.ifr_hwaddr), hwaddr, sizeof(struct sockaddr));
# ^
# ifenslave.c:915:2: warning: incompatible implicit declaration of built-in function 'memcpy' [enabled by default]
# ifenslave.c:915:14: error: request for member 'ifr_hwaddr' in something not a structure or union
# memcpy(&(ifr.ifr_hwaddr), hwaddr, sizeof(struct sockaddr));
# ^
# ifenslave.c:915:43: error: invalid application of 'sizeof' to incomplete type 'struct sockaddr'
# memcpy(&(ifr.ifr_hwaddr), hwaddr, sizeof(struct sockaddr));
# ^
# ifenslave.c:915:50: warning: passing argument 3 of 'memcpy' makes integer from pointer without a cast [enabled by default]
# memcpy(&(ifr.ifr_hwaddr), hwaddr, sizeof(struct sockaddr));
# ^
# ifenslave.c:915:50: note: expected 'unsigned int' but argument is of type 'struct dev_ifr *'
# ifenslave.c:916:20: error: 'SIOCSIFHWADDR' undeclared (first use in this function)
# res = ioctl(skfd, SIOCSIFHWADDR, &ifr);
# ^
# ifenslave.c:918:17: error: 'errno' undeclared (first use in this function)
# saved_errno = errno;
# ^
# ifenslave.c:918:15: warning: assignment makes integer from pointer without a cast [enabled by default]
# saved_errno = errno;
# ^
# ifenslave.c:242:3: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
# fprintf(stderr, fmt, ## args )
# ^
# ifenslave.c:919:3: note: in expansion of macro 'v_print'
# v_print("Master '%s': Error: SIOCSIFHWADDR failed: %s\n",
# ^
# ifenslave.c:242:11: error: 'stderr' undeclared (first use in this function)
# fprintf(stderr, fmt, ## args )
# ^
# ifenslave.c:919:3: note: in expansion of macro 'v_print'
# v_print("Master '%s': Error: SIOCSIFHWADDR failed: %s\n",
# ^
# ifenslave.c:919:3: warning: format '%s' expects argument of type 'char *', but argument 4 has type 'int' [-Wformat=]
# ifenslave.c:242:3: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
# fprintf(stderr, fmt, ## args )
# ^
# ifenslave.c:923:3: note: in expansion of macro 'v_print'
# v_print("Master '%s': hardware address set to "
# ^
# ifenslave.c:911:15: warning: unused variable 'ifr' [-Wunused-variable]
# struct ifreq ifr;
# ^
# ifenslave.c: At top level:
# ifenslave.c:932:56: warning: 'struct sockaddr' declared inside parameter list [enabled by default]
# static int set_slave_hwaddr(char *slave_ifname, struct sockaddr *hwaddr)
# ^
# ifenslave.c:932:12: error: conflicting types for 'set_slave_hwaddr'
# static int set_slave_hwaddr(char *slave_ifname, struct sockaddr *hwaddr)
# ^
# ifenslave.c:230:12: note: previous declaration of 'set_slave_hwaddr' was here
# static int set_slave_hwaddr(char *slave_ifname, struct sockaddr *hwaddr);
# ^
# ifenslave.c: In function 'set_slave_hwaddr':
# ifenslave.c:934:47: error: dereferencing pointer to incomplete type
# unsigned char *addr = (unsigned char *)hwaddr->sa_data;
# ^
# ifenslave.c:934:47: error: request for member 'sa_data' in something not a structure or union
# ifenslave.c:935:15: error: storage size of 'ifr' isn't known
# struct ifreq ifr;
# ^
# ifenslave.c:938:2: warning: incompatible implicit declaration of built-in function 'strncpy' [enabled by default]
# strncpy(ifr.ifr_name, slave_ifname, IFNAMSIZ);
# ^
# ifenslave.c:938:13: error: request for member 'ifr_name' in something not a structure or union
# strncpy(ifr.ifr_name, slave_ifname, IFNAMSIZ);
# ^
# ifenslave.c:938:38: error: 'IFNAMSIZ' undeclared (first use in this function)
# strncpy(ifr.ifr_name, slave_ifname, IFNAMSIZ);
# ^
# ifenslave.c:938:2: warning: passing argument 1 of 'strncpy' from incompatible pointer type [enabled by default]
# strncpy(ifr.ifr_name, slave_ifname, IFNAMSIZ);
# ^
# ifenslave.c:938:2: note: expected 'char *' but argument is of type 'struct dev_ifr *'
# ifenslave.c:938:2: warning: passing argument 3 of 'strncpy' makes integer from pointer without a cast [enabled by default]
# ifenslave.c:938:2: note: expected 'unsigned int' but argument is of type 'struct dev_ifr *'
# ifenslave.c:939:2: warning: incompatible implicit declaration of built-in function 'memcpy' [enabled by default]
# memcpy(&(ifr.ifr_hwaddr), hwaddr, sizeof(struct sockaddr));
# ^
# ifenslave.c:939:14: error: request for member 'ifr_hwaddr' in something not a structure or union
# memcpy(&(ifr.ifr_hwaddr), hwaddr, sizeof(struct sockaddr));
# ^
# ifenslave.c:939:43: error: invalid application of 'sizeof' to incomplete type 'struct sockaddr'
# memcpy(&(ifr.ifr_hwaddr), hwaddr, sizeof(struct sockaddr));
# ^
# ifenslave.c:939:50: warning: passing argument 3 of 'memcpy' makes integer from pointer without a cast [enabled by default]
# memcpy(&(ifr.ifr_hwaddr), hwaddr, sizeof(struct sockaddr));
# ^
# ifenslave.c:939:50: note: expected 'unsigned int' but argument is of type 'struct dev_ifr *'
# ifenslave.c:940:20: error: 'SIOCSIFHWADDR' undeclared (first use in this function)
# res = ioctl(skfd, SIOCSIFHWADDR, &ifr);
# ^
# ifenslave.c:942:17: error: 'errno' undeclared (first use in this function)
# saved_errno = errno;
# ^
# ifenslave.c:942:15: warning: assignment makes integer from pointer without a cast [enabled by default]
# saved_errno = errno;
# ^
# ifenslave.c:242:3: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
# fprintf(stderr, fmt, ## args )
# ^
# ifenslave.c:944:3: note: in expansion of macro 'v_print'
# v_print("Slave '%s': Error: SIOCSIFHWADDR failed: %s\n",
# ^
# ifenslave.c:242:11: error: 'stderr' undeclared (first use in this function)
# fprintf(stderr, fmt, ## args )
# ^
# ifenslave.c:944:3: note: in expansion of macro 'v_print'
# v_print("Slave '%s': Error: SIOCSIFHWADDR failed: %s\n",
# ^
# ifenslave.c:944:3: warning: format '%s' expects argument of type 'char *', but argument 4 has type 'int' [-Wformat=]
# ifenslave.c:947:22: error: 'EBUSY' undeclared (first use in this function)
# if (saved_errno == EBUSY) {
# ^
# ifenslave.c:947:19: warning: comparison between pointer and integer [enabled by default]
# if (saved_errno == EBUSY) {
# ^
# ifenslave.c:950:29: error: 'EOPNOTSUPP' undeclared (first use in this function)
# } else if (saved_errno == EOPNOTSUPP) {
# ^
# ifenslave.c:950:26: warning: comparison between pointer and integer [enabled by default]
# } else if (saved_errno == EOPNOTSUPP) {
# ^
# ifenslave.c:955:29: error: 'EINVAL' undeclared (first use in this function)
# } else if (saved_errno == EINVAL) {
# ^
# ifenslave.c:955:26: warning: comparison between pointer and integer [enabled by default]
# } else if (saved_errno == EINVAL) {
# ^
# ifenslave.c:242:3: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
# fprintf(stderr, fmt, ## args )
# ^
# ifenslave.c:961:3: note: in expansion of macro 'v_print'
# v_print("Slave '%s': hardware address set to "
# ^
# ifenslave.c:935:15: warning: unused variable 'ifr' [-Wunused-variable]
# struct ifreq ifr;
# ^
# ifenslave.c: In function 'set_slave_mtu':
# ifenslave.c:972:15: error: storage size of 'ifr' isn't known
# struct ifreq ifr;
# ^
# ifenslave.c:975:5: error: request for member 'ifr_mtu' in something not a structure or union
# ifr.ifr_mtu = mtu;
# ^
# ifenslave.c:975:2: warning: statement with no effect [-Wunused-value]
# ifr.ifr_mtu = mtu;
# ^
# ifenslave.c:976:2: warning: incompatible implicit declaration of built-in function 'strncpy' [enabled by default]
# strncpy(ifr.ifr_name, slave_ifname, IFNAMSIZ);
# ^
# ifenslave.c:976:13: error: request for member 'ifr_name' in something not a structure or union
# strncpy(ifr.ifr_name, slave_ifname, IFNAMSIZ);
# ^
# ifenslave.c:976:38: error: 'IFNAMSIZ' undeclared (first use in this function)
# strncpy(ifr.ifr_name, slave_ifname, IFNAMSIZ);
# ^
# ifenslave.c:976:2: warning: passing argument 1 of 'strncpy' from incompatible pointer type [enabled by default]
# strncpy(ifr.ifr_name, slave_ifname, IFNAMSIZ);
# ^
# ifenslave.c:976:2: note: expected 'char *' but argument is of type 'struct dev_ifr *'
# ifenslave.c:976:2: warning: passing argument 3 of 'strncpy' makes integer from pointer without a cast [enabled by default]
# ifenslave.c:976:2: note: expected 'unsigned int' but argument is of type 'struct dev_ifr *'
# ifenslave.c:978:20: error: 'SIOCSIFMTU' undeclared (first use in this function)
# res = ioctl(skfd, SIOCSIFMTU, &ifr);
# ^
# ifenslave.c:980:17: error: 'errno' undeclared (first use in this function)
# saved_errno = errno;
# ^
# ifenslave.c:980:15: warning: assignment makes integer from pointer without a cast [enabled by default]
# saved_errno = errno;
# ^
# ifenslave.c:242:3: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
# fprintf(stderr, fmt, ## args )
# ^
# ifenslave.c:981:3: note: in expansion of macro 'v_print'
# v_print("Slave '%s': Error: SIOCSIFMTU failed: %s\n",
# ^
# ifenslave.c:242:11: error: 'stderr' undeclared (first use in this function)
# fprintf(stderr, fmt, ## args )
# ^
# ifenslave.c:981:3: note: in expansion of macro 'v_print'
# v_print("Slave '%s': Error: SIOCSIFMTU failed: %s\n",
# ^
# ifenslave.c:981:3: warning: format '%s' expects argument of type 'char *', but argument 4 has type 'int' [-Wformat=]
# ifenslave.c:242:3: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
# fprintf(stderr, fmt, ## args )
# ^
# ifenslave.c:984:3: note: in expansion of macro 'v_print'
# v_print("Slave '%s': MTU set to %d.\n", slave_ifname, mtu);
# ^
# ifenslave.c:972:15: warning: unused variable 'ifr' [-Wunused-variable]
# struct ifreq ifr;
# ^
# ifenslave.c: In function 'set_if_flags':
# ifenslave.c:992:15: error: storage size of 'ifr' isn't known
# struct ifreq ifr;
# ^
# ifenslave.c:995:5: error: request for member 'ifr_flags' in something not a structure or union
# ifr.ifr_flags = flags;
# ^
# ifenslave.c:995:2: warning: statement with no effect [-Wunused-value]
# ifr.ifr_flags = flags;
# ^
# ifenslave.c:996:2: warning: incompatible implicit declaration of built-in function 'strncpy' [enabled by default]
# strncpy(ifr.ifr_name, ifname, IFNAMSIZ);
# ^
# ifenslave.c:996:13: error: request for member 'ifr_name' in something not a structure or union
# strncpy(ifr.ifr_name, ifname, IFNAMSIZ);
# ^
# ifenslave.c:996:32: error: 'IFNAMSIZ' undeclared (first use in this function)
# strncpy(ifr.ifr_name, ifname, IFNAMSIZ);
# ^
# ifenslave.c:996:2: warning: passing argument 1 of 'strncpy' from incompatible pointer type [enabled by default]
# strncpy(ifr.ifr_name, ifname, IFNAMSIZ);
# ^
# ifenslave.c:996:2: note: expected 'char *' but argument is of type 'struct dev_ifr *'
# ifenslave.c:996:2: warning: passing argument 3 of 'strncpy' makes integer from pointer without a cast [enabled by default]
# ifenslave.c:996:2: note: expected 'unsigned int' but argument is of type 'struct dev_ifr *'
# ifenslave.c:998:20: error: 'SIOCSIFFLAGS' undeclared (first use in this function)
# res = ioctl(skfd, SIOCSIFFLAGS, &ifr);
# ^
# ifenslave.c:1000:17: error: 'errno' undeclared (first use in this function)
# saved_errno = errno;
# ^
# ifenslave.c:1000:15: warning: assignment makes integer from pointer without a cast [enabled by default]
# saved_errno = errno;
# ^
# ifenslave.c:242:3: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
# fprintf(stderr, fmt, ## args )
# ^
# ifenslave.c:1001:3: note: in expansion of macro 'v_print'
# v_print("Interface '%s': Error: SIOCSIFFLAGS failed: %s\n",
# ^
# ifenslave.c:242:11: error: 'stderr' undeclared (first use in this function)
# fprintf(stderr, fmt, ## args )
# ^
# ifenslave.c:1001:3: note: in expansion of macro 'v_print'
# v_print("Interface '%s': Error: SIOCSIFFLAGS failed: %s\n",
# ^
# ifenslave.c:1001:3: warning: format '%s' expects argument of type 'char *', but argument 4 has type 'int' [-Wformat=]
# ifenslave.c:242:3: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
# fprintf(stderr, fmt, ## args )
# ^
# ifenslave.c:1004:3: note: in expansion of macro 'v_print'
# v_print("Interface '%s': flags set to %04X.\n", ifname, flags);
# ^
# ifenslave.c:992:15: warning: unused variable 'ifr' [-Wunused-variable]
# struct ifreq ifr;
# ^
# ifenslave.c: In function 'set_if_up':
# ifenslave.c:1012:38: error: 'IFF_UP' undeclared (first use in this function)
# return set_if_flags(ifname, flags | IFF_UP);
# ^
# ifenslave.c:1012:36: error: invalid operands to binary | (have 'int' and 'struct dev_ifr *')
# return set_if_flags(ifname, flags | IFF_UP);
# ^
# ifenslave.c:1012:2: warning: passing argument 2 of 'set_if_flags' makes integer from pointer without a cast [enabled by default]
# return set_if_flags(ifname, flags | IFF_UP);
# ^
# ifenslave.c:990:12: note: expected 'short int' but argument is of type 'struct dev_ifr *'
# static int set_if_flags(char *ifname, short flags)
# ^
# ifenslave.c: In function 'set_if_down':
# ifenslave.c:1017:39: error: 'IFF_UP' undeclared (first use in this function)
# return set_if_flags(ifname, flags & ~IFF_UP);
# ^
# ifenslave.c:1017:38: error: wrong type argument to bit-complement
# return set_if_flags(ifname, flags & ~IFF_UP);
# ^
# ifenslave.c:1017:36: error: invalid operands to binary & (have 'int' and 'struct dev_ifr *')
# return set_if_flags(ifname, flags & ~IFF_UP);
# ^
# ifenslave.c:1017:2: warning: passing argument 2 of 'set_if_flags' makes integer from pointer without a cast [enabled by default]
# return set_if_flags(ifname, flags & ~IFF_UP);
# ^
# ifenslave.c:990:12: note: expected 'short int' but argument is of type 'struct dev_ifr *'
# static int set_if_flags(char *ifname, short flags)
# ^
# ifenslave.c: In function 'clear_if_addr':
# ifenslave.c:1022:15: error: storage size of 'ifr' isn't known
# struct ifreq ifr;
# ^
# ifenslave.c:1025:2: warning: incompatible implicit declaration of built-in function 'strncpy' [enabled by default]
# strncpy(ifr.ifr_name, ifname, IFNAMSIZ);
# ^
# ifenslave.c:1025:13: error: request for member 'ifr_name' in something not a structure or union
# strncpy(ifr.ifr_name, ifname, IFNAMSIZ);
# ^
# ifenslave.c:1025:32: error: 'IFNAMSIZ' undeclared (first use in this function)
# strncpy(ifr.ifr_name, ifname, IFNAMSIZ);
# ^
# ifenslave.c:1025:2: warning: passing argument 1 of 'strncpy' from incompatible pointer type [enabled by default]
# strncpy(ifr.ifr_name, ifname, IFNAMSIZ);
# ^
# ifenslave.c:1025:2: note: expected 'char *' but argument is of type 'struct dev_ifr *'
# ifenslave.c:1025:2: warning: passing argument 3 of 'strncpy' makes integer from pointer without a cast [enabled by default]
# ifenslave.c:1025:2: note: expected 'unsigned int' but argument is of type 'struct dev_ifr *'
# ifenslave.c:1026:5: error: request for member 'ifr_addr' in something not a structure or union
# ifr.ifr_addr.sa_family = AF_INET;
# ^
# ifenslave.c:1026:14: error: request for member 'sa_family' in something not a structure or union
# ifr.ifr_addr.sa_family = AF_INET;
# ^
# ifenslave.c:1026:27: error: 'AF_INET' undeclared (first use in this function)
# ifr.ifr_addr.sa_family = AF_INET;
# ^
# ifenslave.c:1026:2: warning: statement with no effect [-Wunused-value]
# ifr.ifr_addr.sa_family = AF_INET;
# ^
# ifenslave.c:1027:2: warning: incompatible implicit declaration of built-in function 'memset' [enabled by default]
# memset(ifr.ifr_addr.sa_data, 0, sizeof(ifr.ifr_addr.sa_data));
# ^
# ifenslave.c:1027:12: error: request for member 'ifr_addr' in something not a structure or union
# memset(ifr.ifr_addr.sa_data, 0, sizeof(ifr.ifr_addr.sa_data));
# ^
# ifenslave.c:1027:21: error: request for member 'sa_data' in something not a structure or union
# memset(ifr.ifr_addr.sa_data, 0, sizeof(ifr.ifr_addr.sa_data));
# ^
# ifenslave.c:1027:44: error: request for member 'ifr_addr' in something not a structure or union
# memset(ifr.ifr_addr.sa_data, 0, sizeof(ifr.ifr_addr.sa_data));
# ^
# ifenslave.c:1027:53: error: request for member 'sa_data' in something not a structure or union
# memset(ifr.ifr_addr.sa_data, 0, sizeof(ifr.ifr_addr.sa_data));
# ^
# ifenslave.c:1027:2: warning: passing argument 3 of 'memset' makes integer from pointer without a cast [enabled by default]
# memset(ifr.ifr_addr.sa_data, 0, sizeof(ifr.ifr_addr.sa_data));
# ^
# ifenslave.c:1027:2: note: expected 'unsigned int' but argument is of type 'struct dev_ifr *'
# ifenslave.c:1029:20: error: 'SIOCSIFADDR' undeclared (first use in this function)
# res = ioctl(skfd, SIOCSIFADDR, &ifr);
# ^
# ifenslave.c:1031:17: error: 'errno' undeclared (first use in this function)
# saved_errno = errno;
# ^
# ifenslave.c:1031:15: warning: assignment makes integer from pointer without a cast [enabled by default]
# saved_errno = errno;
# ^
# ifenslave.c:242:3: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
# fprintf(stderr, fmt, ## args )
# ^
# ifenslave.c:1032:3: note: in expansion of macro 'v_print'
# v_print("Interface '%s': Error: SIOCSIFADDR failed: %s\n",
# ^
# ifenslave.c:242:11: error: 'stderr' undeclared (first use in this function)
# fprintf(stderr, fmt, ## args )
# ^
# ifenslave.c:1032:3: note: in expansion of macro 'v_print'
# v_print("Interface '%s': Error: SIOCSIFADDR failed: %s\n",
# ^
# ifenslave.c:1032:3: warning: format '%s' expects argument of type 'char *', but argument 4 has type 'int' [-Wformat=]
# ifenslave.c:242:3: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
# fprintf(stderr, fmt, ## args )
# ^
# ifenslave.c:1035:3: note: in expansion of macro 'v_print'
# v_print("Interface '%s': address cleared\n", ifname);
# ^
# ifenslave.c:1022:15: warning: unused variable 'ifr' [-Wunused-variable]
# struct ifreq ifr;
# ^
# ifenslave.c: In function 'set_if_addr':
# ifenslave.c:1043:15: error: storage size of 'ifr' isn't known
# struct ifreq ifr;
# ^
# ifenslave.c:1053:22: error: 'SIOCGIFADDR' undeclared (first use in this function)
# {"IFADDR", "addr", SIOCGIFADDR, SIOCSIFADDR},
# ^
# ifenslave.c:1053:3: warning: initialization makes integer from pointer without a cast [enabled by default]
# {"IFADDR", "addr", SIOCGIFADDR, SIOCSIFADDR},
# ^
# ifenslave.c:1053:3: warning: (near initialization for 'ifra[0].g_ioctl') [enabled by default]
# ifenslave.c:1053:35: error: 'SIOCSIFADDR' undeclared (first use in this function)
# {"IFADDR", "addr", SIOCGIFADDR, SIOCSIFADDR},
# ^
# ifenslave.c:1053:3: warning: initialization makes integer from pointer without a cast [enabled by default]
# {"IFADDR", "addr", SIOCGIFADDR, SIOCSIFADDR},
# ^
# ifenslave.c:1053:3: warning: (near initialization for 'ifra[0].s_ioctl') [enabled by default]
# ifenslave.c:1054:35: error: 'SIOCGIFDSTADDR' undeclared (first use in this function)
# {"DSTADDR", "destination addr", SIOCGIFDSTADDR, SIOCSIFDSTADDR},
# ^
# ifenslave.c:1054:3: warning: initialization makes integer from pointer without a cast [enabled by default]
# {"DSTADDR", "destination addr", SIOCGIFDSTADDR, SIOCSIFDSTADDR},
# ^
# ifenslave.c:1054:3: warning: (near initialization for 'ifra[1].g_ioctl') [enabled by default]
# ifenslave.c:1054:51: error: 'SIOCSIFDSTADDR' undeclared (first use in this function)
# {"DSTADDR", "destination addr", SIOCGIFDSTADDR, SIOCSIFDSTADDR},
# ^
# ifenslave.c:1054:3: warning: initialization makes integer from pointer without a cast [enabled by default]
# {"DSTADDR", "destination addr", SIOCGIFDSTADDR, SIOCSIFDSTADDR},
# ^
# ifenslave.c:1054:3: warning: (near initialization for 'ifra[1].s_ioctl') [enabled by default]
# ifenslave.c:1055:33: error: 'SIOCGIFBRDADDR' undeclared (first use in this function)
# {"BRDADDR", "broadcast addr", SIOCGIFBRDADDR, SIOCSIFBRDADDR},
# ^
# ifenslave.c:1055:3: warning: initialization makes integer from pointer without a cast [enabled by default]
# {"BRDADDR", "broadcast addr", SIOCGIFBRDADDR, SIOCSIFBRDADDR},
# ^
# ifenslave.c:1055:3: warning: (near initialization for 'ifra[2].g_ioctl') [enabled by default]
# ifenslave.c:1055:49: error: 'SIOCSIFBRDADDR' undeclared (first use in this function)
# {"BRDADDR", "broadcast addr", SIOCGIFBRDADDR, SIOCSIFBRDADDR},
# ^
# ifenslave.c:1055:3: warning: initialization makes integer from pointer without a cast [enabled by default]
# {"BRDADDR", "broadcast addr", SIOCGIFBRDADDR, SIOCSIFBRDADDR},
# ^
# ifenslave.c:1055:3: warning: (near initialization for 'ifra[2].s_ioctl') [enabled by default]
# ifenslave.c:1056:26: error: 'SIOCGIFNETMASK' undeclared (first use in this function)
# {"NETMASK", "netmask", SIOCGIFNETMASK, SIOCSIFNETMASK},
# ^
# ifenslave.c:1056:3: warning: initialization makes integer from pointer without a cast [enabled by default]
# {"NETMASK", "netmask", SIOCGIFNETMASK, SIOCSIFNETMASK},
# ^
# ifenslave.c:1056:3: warning: (near initialization for 'ifra[3].g_ioctl') [enabled by default]
# ifenslave.c:1056:42: error: 'SIOCSIFNETMASK' undeclared (first use in this function)
# {"NETMASK", "netmask", SIOCGIFNETMASK, SIOCSIFNETMASK},
# ^
# ifenslave.c:1056:3: warning: initialization makes integer from pointer without a cast [enabled by default]
# {"NETMASK", "netmask", SIOCGIFNETMASK, SIOCSIFNETMASK},
# ^
# ifenslave.c:1056:3: warning: (near initialization for 'ifra[3].s_ioctl') [enabled by default]
# ifenslave.c:1057:3: warning: initialization from incompatible pointer type [enabled by default]
# {NULL, NULL, 0, 0},
# ^
# ifenslave.c:1057:3: warning: (near initialization for 'ifra[4].req_name') [enabled by default]
# ifenslave.c:1057:3: warning: initialization from incompatible pointer type [enabled by default]
# ifenslave.c:1057:3: warning: (near initialization for 'ifra[4].desc') [enabled by default]
# ifenslave.c:1061:3: warning: incompatible implicit declaration of built-in function 'strncpy' [enabled by default]
# strncpy(ifr.ifr_name, master_ifname, IFNAMSIZ);
# ^
# ifenslave.c:1061:14: error: request for member 'ifr_name' in something not a structure or union
# strncpy(ifr.ifr_name, master_ifname, IFNAMSIZ);
# ^
# ifenslave.c:1061:40: error: 'IFNAMSIZ' undeclared (first use in this function)
# strncpy(ifr.ifr_name, master_ifname, IFNAMSIZ);
# ^
# ifenslave.c:1061:3: warning: passing argument 1 of 'strncpy' from incompatible pointer type [enabled by default]
# strncpy(ifr.ifr_name, master_ifname, IFNAMSIZ);
# ^
# ifenslave.c:1061:3: note: expected 'char *' but argument is of type 'struct dev_ifr *'
# ifenslave.c:1061:3: warning: passing argument 3 of 'strncpy' makes integer from pointer without a cast [enabled by default]
# ifenslave.c:1061:3: note: expected 'unsigned int' but argument is of type 'struct dev_ifr *'
# ifenslave.c:1064:22: error: 'errno' undeclared (first use in this function)
# int saved_errno = errno;
# ^
# ifenslave.c:1064:22: warning: initialization makes integer from pointer without a cast [enabled by default]
# ifenslave.c:242:3: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
# fprintf(stderr, fmt, ## args )
# ^
# ifenslave.c:1066:4: note: in expansion of macro 'v_print'
# v_print("Interface '%s': Error: SIOCG%s failed: %s\n",
# ^
# ifenslave.c:242:11: error: 'stderr' undeclared (first use in this function)
# fprintf(stderr, fmt, ## args )
# ^
# ifenslave.c:1066:4: note: in expansion of macro 'v_print'
# v_print("Interface '%s': Error: SIOCG%s failed: %s\n",
# ^
# ifenslave.c:1066:4: warning: format '%s' expects argument of type 'char *', but argument 5 has type 'int' [-Wformat=]
# ifenslave.c:1070:7: error: request for member 'ifr_addr' in something not a structure or union
# ifr.ifr_addr.sa_family = AF_INET;
# ^
# ifenslave.c:1070:16: error: request for member 'sa_family' in something not a structure or union
# ifr.ifr_addr.sa_family = AF_INET;
# ^
# ifenslave.c:1070:29: error: 'AF_INET' undeclared (first use in this function)
# ifr.ifr_addr.sa_family = AF_INET;
# ^
# ifenslave.c:1070:4: warning: statement with no effect [-Wunused-value]
# ifr.ifr_addr.sa_family = AF_INET;
# ^
# ifenslave.c:1071:4: warning: incompatible implicit declaration of built-in function 'memset' [enabled by default]
# memset(ifr.ifr_addr.sa_data, 0,
# ^
# ifenslave.c:1071:14: error: request for member 'ifr_addr' in something not a structure or union
# memset(ifr.ifr_addr.sa_data, 0,
# ^
# ifenslave.c:1071:23: error: request for member 'sa_data' in something not a structure or union
# memset(ifr.ifr_addr.sa_data, 0,
# ^
# ifenslave.c:1072:21: error: request for member 'ifr_addr' in something not a structure or union
# sizeof(ifr.ifr_addr.sa_data));
# ^
# ifenslave.c:1072:30: error: request for member 'sa_data' in something not a structure or union
# sizeof(ifr.ifr_addr.sa_data));
# ^
# ifenslave.c:1072:11: warning: passing argument 3 of 'memset' makes integer from pointer without a cast [enabled by default]
# sizeof(ifr.ifr_addr.sa_data));
# ^
# ifenslave.c:1072:11: note: expected 'unsigned int' but argument is of type 'struct dev_ifr *'
# ifenslave.c:1075:14: error: request for member 'ifr_name' in something not a structure or union
# strncpy(ifr.ifr_name, slave_ifname, IFNAMSIZ);
# ^
# ifenslave.c:1075:3: warning: passing argument 1 of 'strncpy' from incompatible pointer type [enabled by default]
# strncpy(ifr.ifr_name, slave_ifname, IFNAMSIZ);
# ^
# ifenslave.c:1075:3: note: expected 'char *' but argument is of type 'struct dev_ifr *'
# ifenslave.c:1075:3: warning: passing argument 3 of 'strncpy' makes integer from pointer without a cast [enabled by default]
# ifenslave.c:1075:3: note: expected 'unsigned int' but argument is of type 'struct dev_ifr *'
# ifenslave.c:1078:22: warning: initialization makes integer from pointer without a cast [enabled by default]
# int saved_errno = errno;
# ^
# ifenslave.c:242:3: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
# fprintf(stderr, fmt, ## args )
# ^
# ifenslave.c:1080:4: note: in expansion of macro 'v_print'
# v_print("Interface '%s': Error: SIOCS%s failed: %s\n",
# ^
# ifenslave.c:1080:4: warning: format '%s' expects argument of type 'char *', but argument 5 has type 'int' [-Wformat=]
# ifenslave.c:1086:32: error: request for member 'ifr_addr' in something not a structure or union
# ipaddr = (unsigned char *)ifr.ifr_addr.sa_data;
# ^
# ifenslave.c:1086:41: error: request for member 'sa_data' in something not a structure or union
# ipaddr = (unsigned char *)ifr.ifr_addr.sa_data;
# ^
# ifenslave.c:242:3: warning: incompatible implicit declaration of built-in function 'fprintf' [enabled by default]
# fprintf(stderr, fmt, ## args )
# ^
# ifenslave.c:1087:3: note: in expansion of macro 'v_print'
# v_print("Interface '%s': set IP %s to %d.%d.%d.%d\n",
# ^
# ifenslave.c:1043:15: warning: unused variable 'ifr' [-Wunused-variable]
# struct ifreq ifr;
# ^
# ifenslave.c: At top level:
# ifenslave.c:229:12: warning: 'set_master_hwaddr' used but never defined [enabled by default]
# static int set_master_hwaddr(char *master_ifname, struct sockaddr *hwaddr);
# ^
# ifenslave.c:230:12: warning: 'set_slave_hwaddr' used but never defined [enabled by default]
# static int set_slave_hwaddr(char *slave_ifname, struct sockaddr *hwaddr);
# ^
# ifenslave.c:908:12: warning: 'set_master_hwaddr' defined but not used [-Wunused-function]
# static int set_master_hwaddr(char *master_ifname, struct sockaddr *hwaddr)
# ^
# ifenslave.c:932:12: warning: 'set_slave_hwaddr' defined but not used [-Wunused-function]
# static int set_slave_hwaddr(char *slave_ifname, struct sockaddr *hwaddr)
# ^
# ==> ERROR: A failure occurred in build().
# Aborting...