[BusyBox 0002994]: SIOCBRADDBR (and a few others) undeclared

bugs at busybox.net bugs at busybox.net
Mon Apr 21 02:05:52 UTC 2008


A NOTE has been added to this issue. 
====================================================================== 
http://busybox.net/bugs/view.php?id=2994 
====================================================================== 
Reported By:                thorstenhirsch
Assigned To:                BusyBox
====================================================================== 
Project:                    BusyBox
Issue ID:                   2994
Category:                   Networking Support
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     assigned
====================================================================== 
Date Submitted:             04-20-2008 12:08 PDT
Last Modified:              04-20-2008 19:05 PDT
====================================================================== 
Summary:                    SIOCBRADDBR (and a few others) undeclared
Description: 
compiling busybox 1.10.1 fails with the following error:

networking/brctl.c: In function `brctl_main':
networking/brctl.c:136: error: `SIOCBRADDBR' undeclared (fir              
                                      st use in this function)
networking/brctl.c:136: error: (Each undeclared identifier i              
                                      s reported only once
networking/brctl.c:136: error: for each function it appears               
                                      in.)
networking/brctl.c:136: error: `SIOCBRDELBR' undeclared (fir              
                                      st use in this function)
networking/brctl.c:150: error: `SIOCBRADDIF' undeclared (fir              
                                      st use in this function)
networking/brctl.c:150: error: `SIOCBRDELIF' undeclared (fir              
                                      st use in this function)
make[1]: *** [networking/brctl.o] Error 1
make: *** [networking] Error 2

My linkstation's sockios.h (kernel 2.4.20) has none of the 4 definitions,
but my desktop computer (2.6.x) has. So I think you should put the code of
brctl.c into #ifdef or something like that.
====================================================================== 

---------------------------------------------------------------------- 
 thorstenhirsch - 04-20-08 12:23  
---------------------------------------------------------------------- 
And then, the next file with a lot of missing declarations is
networking/ifenslave.c:

In file included from networking/ifenslave.c:104:
/usr/include/linux/if_bonding.h:65: error: `IFNAMSIZ' undeclared here (not
in a function)
networking/ifenslave.c:115: error: field `mtu' has incomplete type
networking/ifenslave.c:115: error: field `flags' has incomplete type
networking/ifenslave.c:115: error: field `hwaddr' has incomplete type
networking/ifenslave.c: In function `ifenslave_main':
networking/ifenslave.c:215: error: `IFF_MASTER' undeclared (first use in
this function)
networking/ifenslave.c:215: error: (Each undeclared identifier is reported
only once
networking/ifenslave.c:215: error: for each function it appears in.)
networking/ifenslave.c:219: error: `IFF_UP' undeclared (first use in this
function)
networking/ifenslave.c: In function `get_drv_info':
networking/ifenslave.c:301: error: storage size of `ifr' isn't known
networking/ifenslave.c:305: error: `IFNAMSIZ' undeclared (first use in
this function)
networking/ifenslave.c:310: error: `BOND_ABI_VERSION' undeclared (first
use in this function)
networking/ifenslave.c:301: warning: unused variable `ifr'
networking/ifenslave.c: In function `change_active':
networking/ifenslave.c:327: error: storage size of `ifr' isn't known
networking/ifenslave.c:329: error: `IFF_SLAVE' undeclared (first use in
this function)
networking/ifenslave.c:335: error: `IFNAMSIZ' undeclared (first use in
this function)
networking/ifenslave.c:327: warning: unused variable `ifr'
networking/ifenslave.c: In function `enslave':
networking/ifenslave.c:349: error: storage size of `ifr' isn't known
networking/ifenslave.c:352: error: `IFF_SLAVE' undeclared (first use in
this function)
networking/ifenslave.c:451: error: `IFNAMSIZ' undeclared (first use in
this function)
networking/ifenslave.c:349: warning: unused variable `ifr'
networking/ifenslave.c: In function `release':
networking/ifenslave.c:478: error: storage size of `ifr' isn't known
networking/ifenslave.c:481: error: `IFF_SLAVE' undeclared (first use in
this function)
networking/ifenslave.c:487: error: `IFNAMSIZ' undeclared (first use in
this function)
networking/ifenslave.c:478: warning: unused variable `ifr'
networking/ifenslave.c: In function `get_if_settings':
networking/ifenslave.c:511: error: `IFNAMSIZ' undeclared (first use in
this function)
networking/ifenslave.c: In function `get_slave_flags':
networking/ifenslave.c:523: error: `IFNAMSIZ' undeclared (first use in
this function)
networking/ifenslave.c: In function `set_master_hwaddr':
networking/ifenslave.c:529: error: storage size of `ifr' isn't known
networking/ifenslave.c:531: error: `IFNAMSIZ' undeclared (first use in
this function)
networking/ifenslave.c:529: warning: unused variable `ifr'
networking/ifenslave.c: In function `set_slave_hwaddr':
networking/ifenslave.c:538: error: storage size of `ifr' isn't known
networking/ifenslave.c:540: error: `IFNAMSIZ' undeclared (first use in
this function)
networking/ifenslave.c:538: warning: unused variable `ifr'
networking/ifenslave.c: In function `set_slave_mtu':
networking/ifenslave.c:547: error: storage size of `ifr' isn't known
networking/ifenslave.c:550: error: `IFNAMSIZ' undeclared (first use in
this function)
networking/ifenslave.c:547: warning: unused variable `ifr'
networking/ifenslave.c: In function `set_if_flags':
networking/ifenslave.c:556: error: storage size of `ifr' isn't known
networking/ifenslave.c:559: error: `IFNAMSIZ' undeclared (first use in
this function)
networking/ifenslave.c:556: warning: unused variable `ifr'
networking/ifenslave.c: In function `set_if_up':
networking/ifenslave.c:565: error: `IFF_UP' undeclared (first use in this
function)
networking/ifenslave.c: In function `set_if_down':
networking/ifenslave.c:573: error: `IFF_UP' undeclared (first use in this
function)
networking/ifenslave.c: In function `clear_if_addr':
networking/ifenslave.c:581: error: storage size of `ifr' isn't known
networking/ifenslave.c:583: error: `IFNAMSIZ' undeclared (first use in
this function)
networking/ifenslave.c:581: warning: unused variable `ifr'
networking/ifenslave.c: In function `set_if_addr':
networking/ifenslave.c:601: error: storage size of `ifr' isn't known
networking/ifenslave.c:606: error: `IFNAMSIZ' undeclared (first use in
this function)
networking/ifenslave.c:601: warning: unused variable `ifr'
make[1]: *** [networking/ifenslave.o] Error 1
make: *** [networking] Error 2 

---------------------------------------------------------------------- 
 vda - 04-20-08 19:05  
---------------------------------------------------------------------- 
Random googling shows:

http://www.delorie.com/gnu/docs/glibc/libc_308.html, dated 2003, says:

The following functions, constants and data types are declared in the
header file 'net/if.h'.

Constant: size_t IFNAMSIZ
    This constant defines the maximum buffer size needed to hold an
interface name, including its terminating zero byte.

If your net/if.h is so old that it doesn't have that, you are bound to get
many more warnings from other applets. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
04-20-08 12:08  thorstenhirsch New Issue                                    
04-20-08 12:08  thorstenhirsch Status                   new => assigned     
04-20-08 12:08  thorstenhirsch Assigned To               => BusyBox         
04-20-08 12:23  thorstenhirsch Note Added: 0006764                          
04-20-08 19:05  vda            Note Added: 0006774                          
======================================================================




More information about the busybox-cvs mailing list