[BusyBox 0000903]: Missing #includes in some applets

bugs at busybox.net bugs at busybox.net
Wed Jun 28 20:03:19 UTC 2006


A NOTE has been added to this issue. 
====================================================================== 
http://busybox.net/bugs/view.php?id=903 
====================================================================== 
Reported By:                iggarpe
Assigned To:                BusyBox
====================================================================== 
Project:                    BusyBox
Issue ID:                   903
Category:                   Standards Compliance
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
====================================================================== 
Date Submitted:             06-14-2006 02:22 PDT
Last Modified:              06-28-2006 13:03 PDT
====================================================================== 
Summary:                    Missing #includes in some applets
Description: 
insmod.c    should #include "libgen.h"
arping.c    should #include "net/if_arp.h"
ifconfig.c  should #include "sys/types.h"
nslookup.c  should #include "resolv.h"

And wherever "sys/fcntl.h" is used, "fcntl.h" should be used instead.

I say "should" because those files use functions and structures which are
defined in those headers. Currently, busybox WILL compile without errors
in any standard unix box because those headers are included somewhere in
the other included files.

However, if one tries to compile in other architechtures with different
libc, the erros will surface.

====================================================================== 

---------------------------------------------------------------------- 
 landley - 06-28-06 07:38  
---------------------------------------------------------------------- 
Which architectures?

I'm not very interested in "fixing" purely theoretical errors... 

---------------------------------------------------------------------- 
 iggarpe - 06-28-06 09:42  
---------------------------------------------------------------------- 
The mentioned files do use structures and functions that are defined in
those includes, so the includes should be there. Or so the man pages say.

I think this should be fixed for correctness' sake, AND because it's free:
the fix is trivial (the hard part, identifying those missing includes is
already done). 

---------------------------------------------------------------------- 
 landley - 06-28-06 13:03  
---------------------------------------------------------------------- 
So no architectures are impacted by this, and this is a purely theoretical
error.

In 1.3 I'm moving most of the #includes to libbb.h, and out of the
individual applets.  Until then, my lack of caring about this is just
about absolute.  During 1.3, my lack of caring about this will merely be
monumental. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
06-14-06 02:22  iggarpe        New Issue                                    
06-14-06 02:22  iggarpe        Status                   new => assigned     
06-14-06 02:22  iggarpe        Assigned To               => BusyBox         
06-28-06 07:38  landley        Note Added: 0001471                          
06-28-06 09:42  iggarpe        Note Added: 0001472                          
06-28-06 13:03  landley        Note Added: 0001473                          
======================================================================




More information about the busybox-cvs mailing list