=> Bootstrap dependency digest>=20010302: found digest-20121220 ===> Building for cmu-dhcpd-3.3.7.9 cc -O -DNO_SNMP -c dhcp.c In file included from dhcp.c:42: ./dhcpd.h:182:8: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] extern ping(); ~~~~~~ ^ dhcp.c:144:2: warning: implicit declaration of function 'report' is invalid in C99 [-Wimplicit-function-declaration] report(LOG_INFO,"using last binds dir %s",bindingsdir); ^ dhcp.c:189:4: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat] binding->replys); ^~~~~~~~~~~~~~~ dhcp.c:588:28: warning: implicit declaration of function 'dhcp_opts_field' is invalid in C99 [-Wimplicit-function-declaration] if ((dhcp_opts_field_rc = dhcp_opts_field(cp + VEND_OFFSET, pktlen - VEND_OFFSET, cl, &errstr)) >= 0) { ^ dhcp.c:934:2: warning: implicit declaration of function 'del_bindata' is invalid in C99 [-Wimplicit-function-declaration] del_bindata(cl->cliid); ^ dhcp.c:1309:11: warning: implicit declaration of function 'access_network' is invalid in C99 [-Wimplicit-function-declaration] rc=access_network(c->code,ROAMING_ACCESS|REG_ACCESS|DHCP_ACCESS); ^ dhcp.c:1565:5: warning: implicit declaration of function 'fill_header' is invalid in C99 [-Wimplicit-function-declaration] if(fill_header(rpkt,hp,&bootsize)){ ^ dhcp.c:1602:5: warning: passing 'byte [1]' to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] cl.user->data,cl.user->length); ^~~~~~~~~~~~~ ./utils.h:12:88: note: passing argument to parameter 'value' here int insert_string_opt P_((struct bootp *bp, struct opts *opt, unsigned char tag, char *value, int len)); ^ ./utils.h:2:15: note: expanded from macro 'P_' #define P_(s) s ^ dhcp.c:1606:11: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] if (rc=do_req_opts(hp, cl.req_opts, (u_char *) rpkt, &opt, &sent_options)) { ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ dhcp.c:1606:11: note: place parentheses around the assignment to silence this warning if (rc=do_req_opts(hp, cl.req_opts, (u_char *) rpkt, &opt, &sent_options)) { ^ ( ) dhcp.c:1606:11: note: use '==' to turn this assignment into an equality comparison if (rc=do_req_opts(hp, cl.req_opts, (u_char *) rpkt, &opt, &sent_options)) { ^ == dhcp.c:1625:9: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] if (rc=do_req_opts(hp, (u_char *) &request_client_fqdn_option, (u_char *) rpkt, &opt, &sent_options)) { ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ dhcp.c:1625:9: note: place parentheses around the assignment to silence this warning if (rc=do_req_opts(hp, (u_char *) &request_client_fqdn_option, (u_char *) rpkt, &opt, &sent_options)) { ^ ( ) dhcp.c:1625:9: note: use '==' to turn this assignment into an equality comparison if (rc=do_req_opts(hp, (u_char *) &request_client_fqdn_option, (u_char *) rpkt, &opt, &sent_options)) { ^ == dhcp.c:1638:9: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] if (rc=do_opts(hp, (u_char *) rpkt, &opt, &sent_options)) { ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ dhcp.c:1638:9: note: place parentheses around the assignment to silence this warning if (rc=do_opts(hp, (u_char *) rpkt, &opt, &sent_options)) { ^ ( ) dhcp.c:1638:9: note: use '==' to turn this assignment into an equality comparison if (rc=do_opts(hp, (u_char *) rpkt, &opt, &sent_options)) { ^ == dhcp.c:2816:6: warning: passing 'byte [1]' to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] cl.user->data,cl.user->length); ^~~~~~~~~~~~~ ./utils.h:12:88: note: passing argument to parameter 'value' here int insert_string_opt P_((struct bootp *bp, struct opts *opt, unsigned char tag, char *value, int len)); ^ ./utils.h:2:15: note: expanded from macro 'P_' #define P_(s) s ^ dhcp.c:2820:11: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] if (rc=do_req_opts(hp, cl.req_opts, (u_char *) rpkt, &opt, &sent_options)) { ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ dhcp.c:2820:11: note: place parentheses around the assignment to silence this warning if (rc=do_req_opts(hp, cl.req_opts, (u_char *) rpkt, &opt, &sent_options)) { ^ ( ) dhcp.c:2820:11: note: use '==' to turn this assignment into an equality comparison if (rc=do_req_opts(hp, cl.req_opts, (u_char *) rpkt, &opt, &sent_options)) { ^ == dhcp.c:2839:9: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] if (rc=do_req_opts(hp, (u_char *) &request_client_fqdn_option, (u_char *) rpkt, &opt, &sent_options)) { ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ dhcp.c:2839:9: note: place parentheses around the assignment to silence this warning if (rc=do_req_opts(hp, (u_char *) &request_client_fqdn_option, (u_char *) rpkt, &opt, &sent_options)) { ^ ( ) dhcp.c:2839:9: note: use '==' to turn this assignment into an equality comparison if (rc=do_req_opts(hp, (u_char *) &request_client_fqdn_option, (u_char *) rpkt, &opt, &sent_options)) { ^ == dhcp.c:2851:9: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] if (rc=do_opts(hp, (u_char *) rpkt, &opt, &sent_options)) { ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ dhcp.c:2851:9: note: place parentheses around the assignment to silence this warning if (rc=do_opts(hp, (u_char *) rpkt, &opt, &sent_options)) { ^ ( ) dhcp.c:2851:9: note: use '==' to turn this assignment into an equality comparison if (rc=do_opts(hp, (u_char *) rpkt, &opt, &sent_options)) { ^ == dhcp.c:3411:9: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] if (rc = do_req_opts(hp, req_opts, bp, cur, f)) { ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ dhcp.c:3411:9: note: place parentheses around the assignment to silence this warning if (rc = do_req_opts(hp, req_opts, bp, cur, f)) { ^ ( ) dhcp.c:3411:9: note: use '==' to turn this assignment into an equality comparison if (rc = do_req_opts(hp, req_opts, bp, cur, f)) { ^ == dhcp.c:3444:11: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] if (rc = insert_generic_opt((struct bootp *) bp, cur, tag_code, tag_data, (int) tag_datalen)) ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ dhcp.c:3444:11: note: place parentheses around the assignment to silence this warning if (rc = insert_generic_opt((struct bootp *) bp, cur, tag_code, tag_data, (int) tag_datalen)) ^ ( ) dhcp.c:3444:11: note: use '==' to turn this assignment into an equality comparison if (rc = insert_generic_opt((struct bootp *) bp, cur, tag_code, tag_data, (int) tag_datalen)) ^ == dhcp.c:3950:45: warning: passing 'byte [1]' to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] insert_string_opt(tmp,&opt,TAG_DHCP_CLIID,cliid->data,cliid->length); ^~~~~~~~~~~ ./utils.h:12:88: note: passing argument to parameter 'value' here int insert_string_opt P_((struct bootp *bp, struct opts *opt, unsigned char tag, char *value, int len)); ^ ./utils.h:2:15: note: expanded from macro 'P_' #define P_(s) s ^ dhcp.c:4059:36: warning: implicit declaration of function 'get_errmsg' is invalid in C99 [-Wimplicit-function-declaration] report(LOG_ERR, " sendto: %s", get_network_errmsg()); ^ ./bootpd.h:64:28: note: expanded from macro 'get_network_errmsg' #define get_network_errmsg get_errmsg ^ dhcp.c:4190:3: warning: implicit declaration of function 'fill_defaults2' is invalid in C99 [-Wimplicit-function-declaration] fill_defaults2(hp,hp2); /* modify hp; info from hp2 is used to override info in hp */ ^ dhcp.c:4216:3: warning: add explicit braces to avoid dangling else [-Wdangling-else] else ^ 21 warnings generated. cc -O -DNO_SNMP -c main.c In file included from main.c:83: ./dhcpd.h:182:8: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] extern ping(); ~~~~~~ ^ main.c:864:2: warning: implicit declaration of function 'init_dhcp' is invalid in C99 [-Wimplicit-function-declaration] init_dhcp(); ^ main.c:1093:4: warning: implicit declaration of function 'readconf' is invalid in C99 [-Wimplicit-function-declaration] readconf(0); ^ main.c:1122:30: warning: implicit declaration of function 'dhcp_discover' is invalid in C99 [-Wimplicit-function-declaration] case DHCPDISCOVER: dhcp_discover(bp); break; ^ main.c:1123:30: warning: implicit declaration of function 'dhcp_request' is invalid in C99 [-Wimplicit-function-declaration] case DHCPREQUEST: dhcp_request(bp); break; ^ main.c:1124:31: warning: implicit declaration of function 'dhcp_release' is invalid in C99 [-Wimplicit-function-declaration] case DHCPRELEASE: dhcp_release(bp); break; ^ main.c:1125:31: warning: implicit declaration of function 'dhcp_decline' is invalid in C99 [-Wimplicit-function-declaration] case DHCPDECLINE: dhcp_decline(bp); break; ^ main.c:1126:30: warning: implicit declaration of function 'dhcp_inform' is invalid in C99 [-Wimplicit-function-declaration] case DHCPINFORM: dhcp_inform(bp); break; ^ main.c:1160:4: warning: implicit declaration of function 'flush_disk' is invalid in C99 [-Wimplicit-function-declaration] flush_disk(); ^ main.c:1172:4: warning: implicit declaration of function 'dumpbindings' is invalid in C99 [-Wimplicit-function-declaration] dumpbindings(bootpd_dumpbind); ^ main.c:1357:21: warning: unsequenced modification and access to 'i' [-Wunsequenced] i+=1+bp->bp_vend[++i]; ~~ ^ main.c:1579:12: warning: implicit declaration of function 'access_network' is invalid in C99 [-Wimplicit-function-declaration] rc=access_network(c->code,ROAMING_ACCESS|REG_ACCESS|BOOTP_ACCESS); ^ main.c:1823:5: warning: implicit declaration of function 'fill_header' is invalid in C99 [-Wimplicit-function-declaration] if(fill_header(bp,hp,&bootsize)) ^ main.c:2220:17: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] if (tmp_addr = getif(&dst)) { ~~~~~~~~~^~~~~~~~~~~~~ main.c:2220:17: note: place parentheses around the assignment to silence this warning if (tmp_addr = getif(&dst)) { ^ ( ) main.c:2220:17: note: use '==' to turn this assignment into an equality comparison if (tmp_addr = getif(&dst)) { ^ == 14 warnings generated. cc -O -DNO_SNMP -c dovend.c In file included from dovend.c:19: ./dhcpd.h:182:8: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] extern ping(); ~~~~~~ ^ 1 warning generated. cc -O -DNO_SNMP -c readfile.c In file included from readfile.c:55: ./dhcpd.h:182:8: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] extern ping(); ~~~~~~ ^ readfile.c:420:4: warning: implicit declaration of function 'reuse_addr' is invalid in C99 [-Wimplicit-function-declaration] reuse_addr(hp); ^ readfile.c:704:2: warning: implicit declaration of function 'readconf' is invalid in C99 [-Wimplicit-function-declaration] readconf(1); ^ readfile.c:1056:35: warning: format specifies type 'unsigned int' but the argument has type 'u_int32' (aka 'unsigned long') [-Wformat] sprintf(current_tagname, "T%u", value); ~~ ^~~~~ %lu readfile.c:1882:27: warning: format specifies type 'unsigned int' but the argument has type 'u_int32' (aka 'unsigned long') [-Wformat] sprintf(tagname, "T%u", value); ~~ ^~~~~ %lu readfile.c:1883:14: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare] if ((value < 0) || (value >= BOOTP_NUM_TAGS)) ~~~~~ ^ ~ 6 warnings generated. cc -O -DNO_SNMP -c hash.c cc -O -DNO_SNMP -c hashf.c hashf.c:153:3: warning: implicit declaration of function 'unlink' is invalid in C99 [-Wimplicit-function-declaration] unlink(direntry->d_name); ^ hashf.c:179:63: warning: format specifies type 'unsigned int' but the argument has type 'unsigned long' [-Wformat] snprintf(name,sizeof(name),"%s/%X",hashtable->dirname,hashcode % hashtable->size); ~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~ %lX hashf.c:354:56: warning: format specifies type 'unsigned int' but the argument has type 'unsigned long' [-Wformat] snprintf(name,sizeof(name),"%s/%X",hashtable->dirname,hashcode % hashtable->size); ~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~ %lX hashf.c:460:63: warning: format specifies type 'unsigned int' but the argument has type 'unsigned long' [-Wformat] snprintf(name,sizeof(name),"%s/%X",hashtable->dirname,hashcode % hashtable->size); ~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~ %lX 4 warnings generated. cc -O -DNO_SNMP -c dynamic.c In file included from dynamic.c:42: ./dhcpd.h:182:8: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] extern ping(); ~~~~~~ ^ dynamic.c:153:51: warning: implicit declaration of function 'get_errmsg' is invalid in C99 [-Wimplicit-function-declaration] report(LOG_ERR, "stat on \"%s\": %s", conffile, get_errmsg()); ^ dynamic.c:195:2: warning: implicit declaration of function 'del_string' is invalid in C99 [-Wimplicit-function-declaration] del_string(cable->name); ^ 3 warnings generated. cc -O -DNO_SNMP -c ping.c In file included from ping.c:41: ./dhcpd.h:182:8: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] extern ping(); ~~~~~~ ^ ping.c:110:14: warning: multiple unsequenced modifications to 'sequence' [-Wunsequenced] sequence= (++sequence % 0xffff); ~ ^ ping.c:112:24: warning: implicit declaration of function 'in_cksum' is invalid in C99 [-Wimplicit-function-declaration] icp->icmp_cksum = in_cksum((u_short *)icp, cc); ^ ping.c:167:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] in_cksum(addr, len) ^ 4 warnings generated. cc -O -DNO_SNMP -c perm.c In file included from perm.c:30: ./dhcpd.h:182:8: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] extern ping(); ~~~~~~ ^ perm.c:56:2: warning: implicit declaration of function 'del_bindata' is invalid in C99 [-Wimplicit-function-declaration] del_bindata(p->cliid); ^ perm.c:110:9: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] while(p=(struct lastbind*)hash_FirstEntry(cache2disk)){ ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ perm.c:110:9: note: place parentheses around the assignment to silence this warning while(p=(struct lastbind*)hash_FirstEntry(cache2disk)){ ^ ( ) perm.c:110:9: note: use '==' to turn this assignment into an equality comparison while(p=(struct lastbind*)hash_FirstEntry(cache2disk)){ ^ == perm.c:636:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ 4 warnings generated. cc -O -DNO_SNMP -c perm_utils.c In file included from perm_utils.c:40: ./dhcpd.h:182:8: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] extern ping(); ~~~~~~ ^ 1 warning generated. cc -O -DNO_SNMP -c lookup.c cc -O -DNO_SNMP -c utils.c In file included from utils.c:55: ./dhcpd.h:182:8: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] extern ping(); ~~~~~~ ^ utils.c:67:15: warning: promoted type 'int' of K&R function parameter is not compatible with the parameter type 'unsigned char' declared in a previous prototype [-Wknr-promoted-parameter] unsigned char tag; ^ ./utils.h:7:75: note: previous declaration is here int insert_byte_opt P_((struct bootp *bp, struct opts *opt, unsigned char tag, unsigned char value)); ^ ./utils.h:2:15: note: expanded from macro 'P_' #define P_(s) s ^ utils.c:68:15: warning: promoted type 'int' of K&R function parameter is not compatible with the parameter type 'unsigned char' declared in a previous prototype [-Wknr-promoted-parameter] unsigned char value; ^ ./utils.h:7:94: note: previous declaration is here int insert_byte_opt P_((struct bootp *bp, struct opts *opt, unsigned char tag, unsigned char value)); ^ ./utils.h:2:15: note: expanded from macro 'P_' #define P_(s) s ^ utils.c:149:15: warning: promoted type 'int' of K&R function parameter is not compatible with the parameter type 'unsigned char' declared in a previous prototype [-Wknr-promoted-parameter] unsigned char tag; ^ ./utils.h:8:76: note: previous declaration is here int insert_ulong_opt P_((struct bootp *bp, struct opts *opt, unsigned char tag, unsigned long value)); ^ ./utils.h:2:15: note: expanded from macro 'P_' #define P_(s) s ^ utils.c:233:15: warning: promoted type 'int' of K&R function parameter is not compatible with the parameter type 'unsigned char' declared in a previous prototype [-Wknr-promoted-parameter] unsigned char tag; ^ ./utils.h:9:77: note: previous declaration is here int insert_ushort_opt P_((struct bootp *bp, struct opts *opt, unsigned char tag, unsigned short value)); ^ ./utils.h:2:15: note: expanded from macro 'P_' #define P_(s) s ^ utils.c:234:16: warning: promoted type 'int' of K&R function parameter is not compatible with the parameter type 'unsigned short' declared in a previous prototype [-Wknr-promoted-parameter] unsigned short value; ^ ./utils.h:9:97: note: previous declaration is here int insert_ushort_opt P_((struct bootp *bp, struct opts *opt, unsigned char tag, unsigned short value)); ^ ./utils.h:2:15: note: expanded from macro 'P_' #define P_(s) s ^ utils.c:318:15: warning: promoted type 'int' of K&R function parameter is not compatible with the parameter type 'unsigned char' declared in a previous prototype [-Wknr-promoted-parameter] unsigned char tag; ^ ./utils.h:10:76: note: previous declaration is here int insert_addrs_opt P_((struct bootp *bp, struct opts *opt, unsigned char tag, struct in_addr *value, int len)); ^ ./utils.h:2:15: note: expanded from macro 'P_' #define P_(s) s ^ utils.c:418:15: warning: promoted type 'int' of K&R function parameter is not compatible with the parameter type 'unsigned char' declared in a previous prototype [-Wknr-promoted-parameter] unsigned char tag; ^ ./utils.h:12:77: note: previous declaration is here int insert_string_opt P_((struct bootp *bp, struct opts *opt, unsigned char tag, char *value, int len)); ^ ./utils.h:2:15: note: expanded from macro 'P_' #define P_(s) s ^ utils.c:503:15: warning: promoted type 'int' of K&R function parameter is not compatible with the parameter type 'unsigned char' declared in a previous prototype [-Wknr-promoted-parameter] unsigned char tag; ^ ./utils.h:13:74: note: previous declaration is here int insert_str_opt P_((struct bootp *bp, struct opts *opt, unsigned char tag, char *value)); ^ ./utils.h:2:15: note: expanded from macro 'P_' #define P_(s) s ^ utils.c:517:15: warning: promoted type 'int' of K&R function parameter is not compatible with the parameter type 'unsigned char' declared in a previous prototype [-Wknr-promoted-parameter] unsigned char tag; ^ ./utils.h:14:78: note: previous declaration is here int insert_generic_opt P_((struct bootp *bp, struct opts *opt, unsigned char tag, byte *data, int data_len)); ^ ./utils.h:2:15: note: expanded from macro 'P_' #define P_(s) s ^ utils.c:521:41: warning: passing 'byte *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] return insert_string_opt(bp, opt, tag, data, data_len); ^~~~ utils.c:541:3: warning: implicit declaration of function 'report' is invalid in C99 [-Wimplicit-function-declaration] report(LOG_ERR, "malloc() failure -- exiting"); ^ utils.c:591:63: warning: implicit declaration of function 'get_errmsg' is invalid in C99 [-Wimplicit-function-declaration] sprintf(tmp_str, "%s(%d) failed: %s", funcname_ptr, tmp_id, get_errmsg()); ^ utils.c:591:55: warning: format specifies type 'int' but the argument has type 'long' [-Wformat] sprintf(tmp_str, "%s(%d) failed: %s", funcname_ptr, tmp_id, get_errmsg()); ~~ ^~~~~~ %ld utils.c:591:63: warning: format specifies type 'char *' but the argument has type 'int' [-Wformat] sprintf(tmp_str, "%s(%d) failed: %s", funcname_ptr, tmp_id, get_errmsg()); ~~ ^~~~~~~~~~~~ %d 15 warnings generated. cc -O -DNO_SNMP -c getif.c In file included from getif.c:25: ./dhcpd.h:182:8: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] extern ping(); ~~~~~~ ^ getif.c:44:21: error: variable has incomplete type 'struct ifreq' struct ifreq *ifr, ifrcopy; ^ getif.c:44:9: note: forward declaration of 'struct ifreq' struct ifreq *ifr, ifrcopy; ^ getif.c:48:16: error: variable has incomplete type 'struct ifconf' struct ifconf ifconf; /* holds list of interfaces as returned by ioctl SIOCGIFCONF */ ^ getif.c:48:9: note: forward declaration of 'struct ifconf' struct ifconf ifconf; /* holds list of interfaces as returned by ioctl SIOCGIFCONF */ ^ getif.c:61:14: error: invalid application of 'sizeof' to an incomplete type 'struct ifreq' len = 100 * sizeof(struct ifreq); /* initial buffer size guess */ ^ ~~~~~~~~~~~~~~ getif.c:44:9: note: forward declaration of 'struct ifreq' struct ifreq *ifr, ifrcopy; ^ getif.c:75:22: error: invalid application of 'sizeof' to an incomplete type 'struct ifconf' rc = ioctl(sockfd, SIOCGIFCONF, (void *)&ifconf); ^~~~~~~~~~~ /usr/include/sys/sockio.h:63:21: note: expanded from macro 'SIOCGIFCONF' #define SIOCGIFCONF _IOWR('i', 38, struct ifconf) /* get ifnet list */ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/sys/ioccom.h:89:48: note: expanded from macro '_IOWR' #define _IOWR(g,n,t) _IOC(IOC_INOUT, (g), (n), sizeof(t)) ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ /usr/include/sys/ioccom.h:83:19: note: expanded from macro '_IOC' ((inout) | (((len) & IOCPARM_MASK) << IOCPARM_SHIFT) | \ ^ getif.c:48:9: note: forward declaration of 'struct ifconf' struct ifconf ifconf; /* holds list of interfaces as returned by ioctl SIOCGIFCONF */ ^ getif.c:93:15: error: invalid application of 'sizeof' to an incomplete type 'struct ifreq' len += 10 * sizeof(struct ifreq); /* increment for next try */ ^ ~~~~~~~~~~~~~~ getif.c:44:9: note: forward declaration of 'struct ifreq' struct ifreq *ifr, ifrcopy; ^ getif.c:106:41: error: incomplete definition of type 'struct ifreq' len = max(sizeof(struct sockaddr), ifr->ifr_addr.sa_len); ~~~^ ./utils.h:20:28: note: expanded from macro 'max' #define max(x, y) (((x) > (y)) ? (x) : (y)) ^ getif.c:44:9: note: forward declaration of 'struct ifreq' struct ifreq *ifr, ifrcopy; ^ getif.c:106:41: error: incomplete definition of type 'struct ifreq' len = max(sizeof(struct sockaddr), ifr->ifr_addr.sa_len); ~~~^ ./utils.h:20:41: note: expanded from macro 'max' #define max(x, y) (((x) > (y)) ? (x) : (y)) ^ getif.c:44:9: note: forward declaration of 'struct ifreq' struct ifreq *ifr, ifrcopy; ^ getif.c:112:20: error: incomplete definition of type 'struct ifreq' ptr += sizeof(ifr->ifr_name) + len; ~~~^ getif.c:44:9: note: forward declaration of 'struct ifreq' struct ifreq *ifr, ifrcopy; ^ getif.c:123:22: error: invalid application of 'sizeof' to an incomplete type 'struct ifreq' rc = ioctl(sockfd, SIOCGIFFLAGS, (void *) &ifrcopy); ^~~~~~~~~~~~ /usr/include/sys/sockio.h:58:22: note: expanded from macro 'SIOCGIFFLAGS' #define SIOCGIFFLAGS _IOWR('i', 17, struct ifreq) /* get ifnet flags */ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/sys/ioccom.h:89:48: note: expanded from macro '_IOWR' #define _IOWR(g,n,t) _IOC(IOC_INOUT, (g), (n), sizeof(t)) ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ /usr/include/sys/ioccom.h:83:19: note: expanded from macro '_IOC' ((inout) | (((len) & IOCPARM_MASK) << IOCPARM_SHIFT) | \ ^ getif.c:44:9: note: forward declaration of 'struct ifreq' struct ifreq *ifr, ifrcopy; ^ getif.c:130:62: error: use of undeclared identifier 'IFF_LOOPBACK' if ( !(ifrcopy.ifr_flags & IFF_UP) || (ifrcopy.ifr_flags & IFF_LOOPBACK) || ^ getif.c:131:30: error: use of undeclared identifier 'IFF_BROADCAST' !(ifrcopy.ifr_flags & IFF_BROADCAST) || (ifrcopy.ifr_flags & IFF_POINTOPOINT) ) { ^ getif.c:131:69: error: use of undeclared identifier 'IFF_POINTOPOINT' !(ifrcopy.ifr_flags & IFF_BROADCAST) || (ifrcopy.ifr_flags & IFF_POINTOPOINT) ) { ^ getif.c:138:10: error: incomplete definition of type 'struct ifreq' if (ifr->ifr_addr.sa_family != AF_INET) { ~~~^ getif.c:44:9: note: forward declaration of 'struct ifreq' struct ifreq *ifr, ifrcopy; ^ getif.c:140:61: error: incomplete definition of type 'struct ifreq' report(LOG_INFO,"interface %s, skipping (not IPv4)", ifr->ifr_name); ~~~^ getif.c:44:9: note: forward declaration of 'struct ifreq' struct ifreq *ifr, ifrcopy; ^ getif.c:151:36: error: incomplete definition of type 'struct ifreq' sip = (struct sockaddr_in *) &ifr->ifr_addr; ~~~^ getif.c:44:9: note: forward declaration of 'struct ifreq' struct ifreq *ifr, ifrcopy; ^ getif.c:154:55: error: incomplete definition of type 'struct ifreq' report(LOG_INFO,"interface %s, IP address: %s", ifr->ifr_name, inet_ntoa(new_interface->ip_address)); ~~~^ getif.c:44:9: note: forward declaration of 'struct ifreq' struct ifreq *ifr, ifrcopy; ^ getif.c:164:22: error: invalid application of 'sizeof' to an incomplete type 'struct ifreq' rc = ioctl(sockfd, SIOCGIFBRDADDR, (void *) &ifrcopy); ^~~~~~~~~~~~~~ /usr/include/sys/sockio.h:60:24: note: expanded from macro 'SIOCGIFBRDADDR' #define SIOCGIFBRDADDR _IOWR('i', 35, struct ifreq) /* get broadcast addr */ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/sys/ioccom.h:89:48: note: expanded from macro '_IOWR' #define _IOWR(g,n,t) _IOC(IOC_INOUT, (g), (n), sizeof(t)) ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ /usr/include/sys/ioccom.h:83:19: note: expanded from macro '_IOC' ((inout) | (((len) & IOCPARM_MASK) << IOCPARM_SHIFT) | \ ^ getif.c:44:9: note: forward declaration of 'struct ifreq' struct ifreq *ifr, ifrcopy; ^ getif.c:173:65: error: incomplete definition of type 'struct ifreq' report(LOG_INFO,"interface %s, IP broadcast address: %s", ifr->ifr_name, inet_ntoa(new_interface->ip_broadcast_address)); ~~~^ getif.c:44:9: note: forward declaration of 'struct ifreq' struct ifreq *ifr, ifrcopy; ^ getif.c:183:22: error: invalid application of 'sizeof' to an incomplete type 'struct ifreq' rc = ioctl(sockfd, SIOCGIFNETMASK, (void *) &ifrcopy); ^~~~~~~~~~~~~~ /usr/include/sys/sockio.h:65:24: note: expanded from macro 'SIOCGIFNETMASK' #define SIOCGIFNETMASK _IOWR('i', 37, struct ifreq) /* get net addr mask */ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/sys/ioccom.h:89:48: note: expanded from macro '_IOWR' #define _IOWR(g,n,t) _IOC(IOC_INOUT, (g), (n), sizeof(t)) ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ /usr/include/sys/ioccom.h:83:19: note: expanded from macro '_IOC' ((inout) | (((len) & IOCPARM_MASK) << IOCPARM_SHIFT) | \ ^ getif.c:44:9: note: forward declaration of 'struct ifreq' struct ifreq *ifr, ifrcopy; ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 1 warning and 20 errors generated. *** Error code 1 Stop. bmake: stopped in /usr/pkgsrc/work/net/cmu-dhcpd/work/CMU-dhcp-3.3.7+PU-9 *** Error code 1 Stop. bmake[1]: stopped in /usr/pkgsrc/net/cmu-dhcpd *** Error code 1 Stop. bmake: stopped in /usr/pkgsrc/net/cmu-dhcpd