svn commit: r188514 - in stable/7/sys: . contrib/pf dev/cxgb libkern

John Baldwin jhb at freebsd.org
Wed Feb 18 07:10:51 PST 2009


On Tuesday 17 February 2009 7:15:33 pm Peter Jeremy wrote:
> On 2009-Feb-12 14:37:58 +0000, John Baldwin <jhb at freebsd.org> wrote:
> >Log:
> >  MFC: Add simple locking for the in-kernel iconv code.
> 
> This breaks building LIBICONV:  Given a config file comprising
> include GENERIC
> options LIBICONV
> 
> you get:
> 
cc -c -O2 -frename-registers -pipe -fno-strict-aliasing -march=nocona -std=c99 -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions -nostdinc  -I. -I/home/pjeremy/xxx/src/sys -I/home/pjeremy/xxx/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include 
opt_global.h -fno-common -finline-limit=8000 --param 
inline-unit-growth=100 --param 
large-function-growth=1000  -mcmodel=kernel -mno-red-zone  -mfpmath=387 -mno-sse -mno-sse2 -mno-mmx -mno-3dnow  -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -Werror  /home/pjeremy/xxx/src/sys/libkern/iconv.c
> /home/pjeremy/xxx/src/sys/libkern/iconv.c: In function 'iconv_mod_unload':
> /home/pjeremy/xxx/src/sys/libkern/iconv.c:92: error: 'curthread' undeclared 
(first use in this function)
> /home/pjeremy/xxx/src/sys/libkern/iconv.c:92: error: (Each undeclared 
identifier is reported only once
> /home/pjeremy/xxx/src/sys/libkern/iconv.c:92: error: for each function it 
appears in.)
> /home/pjeremy/xxx/src/sys/libkern/iconv.c: In function 'iconv_sysctl_add':
> /home/pjeremy/xxx/src/sys/libkern/iconv.c:401: error: 'curthread' undeclared 
(first use in this function)
> /home/pjeremy/xxx/src/sys/libkern/iconv.c: In 
function 'iconv_converter_handler':
> /home/pjeremy/xxx/src/sys/libkern/iconv.c:452: error: 'curthread' undeclared 
(first use in this function)
> *** Error code 1
> 
> Stop in /var/obj/home/pjeremy/xxx/src/sys/LIBICONV.
> 
> I think you need to include <sys/proc.h> to get curthread.  (This should
> probably be documented in sx(9)).

This was fixed by the MFC to <sys/sx.h> yesterday to include <sys/pcpu.h> in 
the _KERNEL section.  I had missed this since the build worked fine with LINT 
and the module build.

-- 
John Baldwin


More information about the svn-src-stable mailing list