Bug 116757

Summary: /sbin/mkkerneldoth does not initialize SUMMIT to '0'
Product: Red Hat Enterprise Linux 2.1 Reporter: Don Smith <sdonald>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED ERRATA QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.1CC: rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-02-24 22:22:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Don Smith 2004-02-24 22:18:16 UTC
Description of problem:
The /sbin/mkkerneldoth script that rc.sysinit runs to create the
/boot/kernel.h has a small omission in that it doesn't initialize the
SUMMIT variable to '0' like it does with the variables for all the
other kernel types. This means that /boot/kernel.h will end up with an
empty definition on a non-Summit box:

#ifndef __BOOT_KERNEL_SUMMIT
#define __BOOT_KERNEL_SUMMIT
#endif

The file 
/lib/modules/`uname -r`/build/include/linux/rhconfig.h #includes
/boot/kernel.h and uses the definitions in its own #define statements.
When it tries to use the __BOOT_KERNEL_SUMMIT definition on line 31:

#if defined(__BOOT_KERNEL_SUMMIT) && (__BOOT_KERNEL_SUMMIT == 1)

it ends up using an empty value in the comparison, and will generate a
syntax error (no left operand) when compiling source that includes
this file.

Version-Release number of selected component (if applicable):

How reproducible:
always

Steps to Reproduce:
1. Include the rhconfig.h file mentioned in some source code
2. Attempt to preprocess/compile the source
3.
  
Actual results:
An error message like
"/lib/modules/2.4.9-e.34smp/build/include/linux/rhconfig.h:31:60:
operator '(' has no left operand"

Expected results:
no error message

Additional info:

Comment 1 Bill Nottingham 2004-02-24 22:22:10 UTC
You need to upgrade to the errata.