Subject: Re: sys/lock.h and pri_t
To: None <>
From: Christos Zoulas <>
List: current-users
Date: 06/03/2007 13:28:44
In article <>,
Kouichirou Hiratsuka  <> wrote:
>At Thu, 31 May 2007 12:00:05 +0200,
>Kurt Schreiner wrote:
>> while trying to get qemu (from pkgsrc) compiled on -current (i386)
>> I find (besides some other problems):
>> ===> Building for qemu-0.9.0
>> gcc -DQEMU_TOOL -O2 -pipe -I/opt/nb/include -DGLX_GLXEXT_LEGACY
>-I/usr/include -Wall -O2 -g -fno-strict-aliasing -I/opt/nb/include
>-L/opt/nb/gcc3/lib -Wl,-R/opt/nb/gcc3/lib -L/opt/nb/lib
>-Wl,-R/opt/nb/lib -L/usr/lib -Wl,-R/usr/lib -L/usr/X11R6/lib
>-Wl,-R/usr/X11R6/lib -g  -o qemu-img qemu-img.c cutils.c block.c
>block-raw.c block-cow.c block-qcow.c aes.c block-vmdk.c block-cloop.c
>block-dmg.c block-bochs.c block-vpc.c block-vvfat.c block-qcow2.c -lz 
>> cutils.c: In function `stristart':
>> cutils.c:75: warning: subscript has type `char'
>> cutils.c:75: warning: subscript has type `char'
>> In file included from /usr/include/sys/disk.h:92,
>>                  from block.c:32:
>> /usr/include/sys/lock.h:117: error: syntax error before "pri_t"
>> /usr/include/sys/lock.h:132: error: syntax error before '}' token
>> /usr/include/sys/lock.h:151: error: syntax error before '}' token
>> [... more errors ...]
>> block.c includes sys/types.h where pri_t is defined BUT:
>> enclosed in #ifdef _NETBSD_SOURCE. So where's the error: Using "pri_t"
>> in sys/lock.h w/o enclosing in #ifdef _NETBSD_SOURCE or should I simply
>> put a "typedef unsinged int pri_t;" somwhere in block.c before sys/lock.h
>> is included?
>Please see:
>best regards.

We need to do some symbol hiding there, because we don't really want pri_t
in the application namespace.