[BusyBox 0000414]: Incorrect include ordering can lead to build failure

bugs at busybox.net bugs at busybox.net
Tue Sep 6 11:36:56 UTC 2005


The following issue has been SUBMITTED. 
====================================================================== 
http://busybox.net/bugs/view.php?id=414 
====================================================================== 
Reported By:                des
Assigned To:                BusyBox
====================================================================== 
Project:                    BusyBox
Issue ID:                   414
Category:                   Other
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
====================================================================== 
Date Submitted:             09-06-2005 04:36 PDT
Last Modified:              09-06-2005 04:36 PDT
====================================================================== 
Summary:                    Incorrect include ordering can lead to build failure
Description: 
Note: actual version is 1.01, which isn't listed in the "Product Version"
pull-down menu in the bug tracking system

busybox.h includes config.h before anything else.

config.h defines or undefines various CONFIG_FOO macros depending on which
parts of BusyBox are to be built.

Some of these macros conflict with similarly-named macros defined in
<linux/autoconf.h> which is pulled in indirectly by <limits.h> and / or
<sys/param.h> near the bottom of busybox.h.

This can lead to a build failure in applets.c.  Let's say you want to
build busybox without the sysctl applet, so config.h contains #undef
CONFIG_SYSCTL.

applets.c includes busybox.h
busybox.h includes config.h -> #undef CONFIG_SYSCTL
busybox.h defines PROTOTYPES and includes applets.h
busybox.h includes <sys/param.h> -> #define CONFIG_SYSCTL 1
applets.c defines MAKE_USAGE and includes applets.h
applets.c undefines PROTOTYPES and MAKE_USAGE and includes applets.h to
generate the applets[] array
applets[] references an undeclared and undefined sysctl_main() -> BOOM

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

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
09-06-05 04:36  des            New Issue                                    
09-06-05 04:36  des            Status                   new => assigned     
09-06-05 04:36  des            Assigned To               => BusyBox         
09-06-05 04:36  des            File Added: applets.diff                     
======================================================================




More information about the busybox-cvs mailing list