Package: mdadm_2.5.4-1

These builds fail like this:

gcc -Wall -Werror -Wstrict-prototypes -ggdb -fomit-frame-pointer -Os 
-DSendmail=\""/usr/sbin/sendmail -t"\" -DCONFFILE=\"/tmp/mdadm.conf\" 
-DCONFFILE2=\"/etc/mdadm.conf\" -DDEBIAN  -c -o util.o util.c
In file included from util.c:34:
/usr/include/linux/blkpg.h:36: error: expected ':', ',', ';', '}' or 
'__attribute__' before '*' token
util.c: In function 'remove_partitions':
util.c:132: error: 'struct blkpg_ioctl_arg' has no member named 'data'
util.c:135: error: 'struct blkpg_ioctl_arg' has no member named 'data'
make[2]: *** [util.o] Error 1
make[2]: Leaving directory /build/buildd/mdadm-2.5.4'

The code in util.c is this:
        struct blkpg_ioctl_arg a;                                               
                    
        struct blkpg_partition p;                                               
                    
                                                                                
                                    
131     a.op = BLKPG_DEL_PARTITION;
132     a.data = (void*)&p;
133     a.datalen = sizeof(p);
134     a.flags = 0;
135     memset(a.data, 0, a.datalen);
        for (p.pno=0; p.pno < 16; p.pno++)
                ioctl(fd, BLKPG, &a);


in /usr/inlcude/linux/blkpg.h we have:
struct blkpg_ioctl_arg {
        int op;
        int flags;
        int datalen;
        void __user *data;
};

It looks like __user is causing a problem. If I delete it then util.c builds OK.
__user is defined in linux/compiler.h

#ifdef __CHECKER__                                                              
                    
# define __user         __attribute__((noderef, address_space(1)))              
                    
#else                                                                           
                    
# define __user                                                                 
                    

If I set it to  __attribute__((noderef, address_space(1))) in blkpg.h then that 
build OK too.

So I really don't understand what gcc is whinging about.

I suspect this is really a gcc bug. What do the threee arches it breaks on have 
in common?

Wookey
-- 
Aleph One Ltd, Bottisham, CAMBRIDGE, CB5 9BA, UK  Tel +44 (0) 1223 811679
work: http://www.aleph1.co.uk/                 play: http://wookware.org/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to