#21452: Failed to compile swconfig
------------------------+------------------------
  Reporter:  anonymous  |      Owner:  developers
      Type:  defect     |     Status:  reopened
  Priority:  normal     |  Milestone:
 Component:  packages   |    Version:  Trunk
Resolution:             |   Keywords:
------------------------+------------------------
Changes (by jolouis):

 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 What was done to actually fix this? Just did a pull from trunk @r48151 and
 trying to compile for R8000 (bcm53xx) gives the same error and build
 failure as originally reported.
 {{{
 o -fPIC -c -o swlib.o swlib.c
 swlib.c:54:38: error: 'SWITCH_LINK_ATTR_MAX' undeclared here (not in a
 function)
  static struct nla_policy link_policy[SWITCH_LINK_ATTR_MAX] = {
                                       ^
 swlib.c:55:3: error: 'SWITCH_LINK_FLAG_LINK' undeclared here (not in a
 function)
   [SWITCH_LINK_FLAG_LINK] = { .type = NLA_FLAG },
    ^
 swlib.c:55:3: error: array index in initializer not of integer type
 swlib.c:55:3: note: (near initialization for 'link_policy')
 swlib.c:55:30: error: field name not in record or union initializer
   [SWITCH_LINK_FLAG_LINK] = { .type = NLA_FLAG },
                               ^
 swlib.c:55:30: note: (near initialization for 'link_policy')
 swlib.c:56:3: error: 'SWITCH_LINK_FLAG_DUPLEX' undeclared here (not in a
 function)
   [SWITCH_LINK_FLAG_DUPLEX] = { .type = NLA_FLAG },
    ^
 swlib.c:56:3: error: array index in initializer not of integer type
 swlib.c:56:3: note: (near initialization for 'link_policy')
 swlib.c:56:32: error: field name not in record or union initializer
   [SWITCH_LINK_FLAG_DUPLEX] = { .type = NLA_FLAG },
                                 ^
 swlib.c:56:32: note: (near initialization for 'link_policy')
 swlib.c:57:3: error: 'SWITCH_LINK_FLAG_ANEG' undeclared here (not in a
 function)
   [SWITCH_LINK_FLAG_ANEG] = { .type = NLA_FLAG },
    ^
 swlib.c:57:3: error: array index in initializer not of integer type
 swlib.c:57:3: note: (near initialization for 'link_policy')
 swlib.c:57:30: error: field name not in record or union initializer
   [SWITCH_LINK_FLAG_ANEG] = { .type = NLA_FLAG },
                               ^
 swlib.c:57:30: note: (near initialization for 'link_policy')
 swlib.c:58:3: error: 'SWITCH_LINK_SPEED' undeclared here (not in a
 function)
   [SWITCH_LINK_SPEED] = { .type = NLA_U32 },
    ^
 swlib.c:58:3: error: array index in initializer not of integer type
 swlib.c:58:3: note: (near initialization for 'link_policy')
 swlib.c:58:26: error: field name not in record or union initializer
   [SWITCH_LINK_SPEED] = { .type = NLA_U32 },
                           ^
 swlib.c:58:26: note: (near initialization for 'link_policy')
 swlib.c:59:3: error: 'SWITCH_LINK_FLAG_EEE_100BASET' undeclared here (not
 in a function)
   [SWITCH_LINK_FLAG_EEE_100BASET] = { .type = NLA_FLAG },
    ^
 swlib.c:59:3: error: array index in initializer not of integer type
 swlib.c:59:3: note: (near initialization for 'link_policy')
 swlib.c:59:38: error: field name not in record or union initializer
   [SWITCH_LINK_FLAG_EEE_100BASET] = { .type = NLA_FLAG },
                                       ^
 swlib.c:59:38: note: (near initialization for 'link_policy')
 swlib.c:60:3: error: 'SWITCH_LINK_FLAG_EEE_1000BASET' undeclared here (not
 in a function)
   [SWITCH_LINK_FLAG_EEE_1000BASET] = { .type = NLA_FLAG },
    ^
 swlib.c:60:3: error: array index in initializer not of integer type
 swlib.c:60:3: note: (near initialization for 'link_policy')
 swlib.c:60:39: error: field name not in record or union initializer
   [SWITCH_LINK_FLAG_EEE_1000BASET] = { .type = NLA_FLAG },
                                        ^
 swlib.c:60:39: note: (near initialization for 'link_policy')
 swlib.c: In function 'store_link_val':
 swlib.c:231:23: error: 'SWITCH_LINK_FLAG_TX_FLOW' undeclared (first use in
 this function)
   link->tx_flow = !!tb[SWITCH_LINK_FLAG_TX_FLOW];
                        ^
 swlib.c:231:23: note: each undeclared identifier is reported only once for
 each function it appears in
 swlib.c:232:23: error: 'SWITCH_LINK_FLAG_RX_FLOW' undeclared (first use in
 this function)
   link->rx_flow = !!tb[SWITCH_LINK_FLAG_RX_FLOW];
                        ^
 swlib.c: In function 'store_val':
 swlib.c:264:14: error: 'SWITCH_ATTR_OP_VALUE_LINK' undeclared (first use
 in this function)
   else if (tb[SWITCH_ATTR_OP_VALUE_LINK])
               ^
 swlib.c: In function 'send_attr_link':
 swlib.c:345:26: error: 'SWITCH_ATTR_OP_VALUE_LINK' undeclared (first use
 in this function)
   n = nla_nest_start(msg, SWITCH_ATTR_OP_VALUE_LINK);
                           ^
 swlib.c: In function 'send_attr_val':
 swlib.c:387:7: error: 'SWITCH_TYPE_LINK' undeclared (first use in this
 function)
   case SWITCH_TYPE_LINK:
        ^
 swlib.c: In function 'swlib_set_attr_string':
 swlib.c:445:18: warning: implicit declaration of function 'isspace'
 [-Wimplicit-function-declaration]
     while(*ptr && isspace(*ptr))
                   ^
 swlib.c:451:9: warning: implicit declaration of function 'isdigit'
 [-Wimplicit-function-declaration]
     if (!isdigit(*ptr))
          ^
 make[4]: *** [swlib.o] Error 1
 }}}

--
Ticket URL: <https://dev.openwrt.org/ticket/21452#comment:4>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
_______________________________________________
openwrt-tickets mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets

Reply via email to