sparc64/68155: Fix sparc64 kernel build when esp is included

Koop Mast kwm at rainbow-runner.nl
Sun Jun 20 19:50:27 GMT 2004


>Number:         68155
>Category:       sparc64
>Synopsis:       Fix sparc64 kernel build when esp is included
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-sparc64
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jun 20 19:50:26 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Koop Mast
>Release:        FreeBSD 5.2.1-RELEASE-p8 i386
>Organization:
>Environment:
System: FreeBSD prisma.rainbow-runner.nl 5.2.1-RELEASE-p8 FreeBSD 5.2.1-RELEASE-p8 #27: Wed Jun 9 11:46:29 CEST 2004 root at prisma.rainbow-runner.nl:/usr/obj/usr/src/sys/UnderTheRainbow i386


	
>Description:
	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
	
>Fix:

	

--- esp_sbus.c.diff begins here ---
--- sys/dev/esp/esp_sbus.c.orig	Sat Jun 12 05:23:37 2004
+++ sys/dev/esp/esp_sbus.c	Sun Jun 20 12:22:16 2004
@@ -71,6 +71,7 @@
 #include <sys/systm.h>
 #include <sys/bus.h>
 #include <sys/kernel.h>
+#include <sys/module.h>
 #include <sys/resource.h>
 #include <sys/lock.h>
 #include <sys/mutex.h>
@@ -134,7 +135,7 @@
 };
 
 static devclass_t	esp_devclass;
-DRIVER_MODULE(esp, sbus, esp_sbus_driver, esp_devclass, 0, 0);
+DRIVER_MODULE(envctrl, sbus, esp_sbus_driver, esp_devclass, 0, 0);
 
 /*
  * Functions and the switch for the MI code.
--- esp_sbus.c.diff ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-sparc64 mailing list