Bug 68155

Summary: Fix sparc64 kernel build when esp is included
Product: Base System Reporter: Koop Mast <kwm>
Component: sparc64Assignee: freebsd-sparc64 (Nobody) <sparc64>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 5.2.1-RELEASE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
esp_sbus.c.diff none

Description Koop Mast 2004-06-20 20:50:26 UTC
	Fix the kernel build on sparc64 by including the missing sys/module.h.
	I'n not sure about the DRIVER_MODULE part, but my ultra 2 builds and
	runs happily with this patch.

How-To-Repeat: 	Build an sparc kernel with the esp driver.

	/usr/src/sys/dev/esp/esp_sbus.c:137: error: syntax error before "esp_sbus_mod"
	/usr/src/sys/dev/esp/esp_sbus.c:137: warning: type defaults to `int' in declaration of `esp_sbus_mod'
	/usr/src/sys/dev/esp/esp_sbus.c:137: warning: initialization makes integer from pointer without a cast
	/usr/src/sys/dev/esp/esp_sbus.c:137: error: initializer element is not computable at load time
	/usr/src/sys/dev/esp/esp_sbus.c:137: error: (near initialization for `esp_sbus_mod')
	/usr/src/sys/dev/esp/esp_sbus.c:137: warning: excess elements in scalar initializer
	/usr/src/sys/dev/esp/esp_sbus.c:137: warning: (near initialization for `esp_sbus_mod')
	/usr/src/sys/dev/esp/esp_sbus.c:137: warning: excess elements in scalar initializer
	/usr/src/sys/dev/esp/esp_sbus.c:137: warning: (near initialization for `esp_sbus_mod')
	/usr/src/sys/dev/esp/esp_sbus.c:137: warning: data definition has no type or storage class
	/usr/src/sys/dev/esp/esp_sbus.c:137: warning: type defaults to `int' in declaration of `DECLARE_MODULE'
	/usr/src/sys/dev/esp/esp_sbus.c:137: warning: parameter names (without types) in function declaration
	/usr/src/sys/dev/esp/esp_sbus.c:137: warning: data definition has no type or storage class
Comment 1 Scott Long freebsd_committer freebsd_triage 2004-06-21 14:48:18 UTC
State Changed
From-To: open->closed

Added module.h.  Changes inside the DRIVER_MODULE line are not needed.