Subject: port-hpcarm/32312: apm on hpcarm ( NetBSD-current ) doesn"t compile
To: None <port-hpcarm-maintainer@netbsd.org, gnats-admin@netbsd.org,>
From: None <zul@netbsd-fr.org>
List: netbsd-bugs
Date: 12/16/2005 00:15:00
>Number:         32312
>Category:       port-hpcarm
>Synopsis:       apm on hpcarm ( NetBSD-current ) doesn"t compile
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    port-hpcarm-maintainer
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Dec 16 00:15:00 +0000 2005
>Originator:     Arnaud Degroote
>Release:        Current
>Organization:
none
>Environment:
building machine
NetBSD Hermes.at.home 3.99.14 NetBSD 3.99.14 (HERMES) #0: Thu Dec 15 11:41:00 CET 2005  zul@Hermes.at.home:/usr/build_tmp/objdir/sys/arch/i386/compile/HERMES i386


hpcarm machine
NetBSD jornada.at.home 3.99.6 NetBSD 3.99.6 (MY_JORNADA720) #0: Wed Jun 22 23:08:15 CEST 2005  zul@Hermes.at.home:/usr/build_tmp/objdir/sys/arch/hpcarm/compile/MY_JORNADA720 hpcarm

>Description:
When I try to build a kernel current with apm enable for hpcarm, the compilation failed with the following error 
:/usr/src/sys/arch/hpcarm/dev/apm.c:100: error: conflicting types for `apmopen'
/usr/src/sys/arch/hpcarm/dev/apm.c:63: error: previous declaration of `apmopen'
/usr/src/sys/arch/hpcarm/dev/apm.c:107: error: conflicting types for `apmclose'
/usr/src/sys/arch/hpcarm/dev/apm.c:64: error: previous declaration of `apmclose'
/usr/src/sys/arch/hpcarm/dev/apm.c:114: error: conflicting types for `apmioctl'
/usr/src/sys/arch/hpcarm/dev/apm.c:65: error: previous declaration of `apmioctl'


I think it is due to the merge of ktrace-lwp but I don"t check the cvs log.
>How-To-Repeat:
cd /usr/src/sys/arch/hpcarm/conf
cp GENERIC GENERIC_APM
echo "apm0 at j720ssp?" >> GENERIC_APM
/usr/src/build.sh -m hpcarm kernel=GENERIC_APM
>Fix:
This little patch solve the issue 

--- /usr/src/sys/arch/hpcarm/dev/apm.c.orig     2005-12-16 00:54:51.000000000 +0                                                                                      
100
+++ /usr/src/sys/arch/hpcarm/dev/apm.c  2005-12-16 00:55:45.000000000 +0100
@@ -96,21 +96,21 @@
 }
 
 static int
-apmopen(dev_t dev, int flag, int mode, struct proc *p)
+apmopen(dev_t dev, int flag, int mode, struct lwp *p)
 {
 
        return 0;
 }
 
 static int
-apmclose(dev_t dev, int flag, int mode, struct proc *p)
+apmclose(dev_t dev, int flag, int mode, struct lwp *p)
 {
 
        return 0;
 }
 
 static int
-apmioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
+apmioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct lwp *p)
 {
        struct apm_softc *sc;