This patch fixes an error when building the kernel with GPROF.  Here's the
error:

1: warnings being treated as errors
../../../../kern/subr_prof.c:102: warning: no previous prototype for 
'sysctl_doprof'
../../../../kern/subr_prof.c: In function 'sysctl_doprof':
../../../../kern/subr_prof.c:112: warning: implicit declaration of function 
'sysctl_int'
../../../../kern/subr_prof.c:121: warning: implicit declaration of function 
'sysctl_struct'
../../../../kern/subr_prof.c:130: warning: implicit declaration of function 
'sysctl_rdstruct'
*** Error code 1 
Stop in /usr/src/sys/arch/amd64/compile/GENERIC.MP.PROF:
 Exit status 1 (subr_prof.o, line 92 of /usr/share/mk/sys.mk)

and the patch:

Index: kern/subr_prof.c
===================================================================
RCS file: /home/miguel/openbsd-cvsroot//src/sys/kern/subr_prof.c,v
retrieving revision 1.18
diff -u -p -r1.18 subr_prof.c
--- kern/subr_prof.c    26 Jun 2010 23:24:45 -0000      1.18
+++ kern/subr_prof.c    9 Jul 2010 20:08:40 -0000
@@ -46,6 +46,7 @@
 #include <sys/malloc.h>
 #include <sys/gmon.h>
 #include <uvm/uvm_extern.h>
+#include <sys/sysctl.h>
 
 /*
  * Froms is actually a bunch of unsigned shorts indexing tos

Reply via email to