[Drbd-dev] Re: FW: [DRBD-cvs] svn commit by phil - r2404 - in trunk: drbd/linux user -* Another micro fix to drbd/linux/connector.h, to make

Philipp Reisner philipp.reisner at linbit.com
Tue Sep 12 10:47:29 CEST 2006


Am Montag, 11. September 2006 22:26 schrieben Sie:
> Hi Phillipp,
>
> Since taking this change, I can no longer build the user directory -- I
> should say that we build using KDIR on a system that is different from the
> config of the target system we run on and with the current Makefile, I am
> getting errors related to netlink like this:
>
> gcc -g -O2 -c -W -Wall -I../drbd   -c -o drbdsetup.o drbdsetup.c
> In file included from drbdsetup.c:51:
> /usr/include/linux/netlink.h:22: error: syntax error before "__u32"
> /usr/include/linux/netlink.h:28: error: syntax error before "__u32"
> /usr/include/linux/netlink.h:30: error: syntax error before "nlmsg_flags"
> /usr/include/linux/netlink.h:31: error: syntax error before "nlmsg_seq"
> /usr/include/linux/netlink.h:32: error: syntax error before "nlmsg_pid"
> /usr/include/linux/netlink.h:82: error: field `msg' has incomplete type
> drbdsetup.c: In function `create_tag_list':
> drbdsetup.c:428: error: invalid application of `sizeof' to incomplete type
> `nlmsghdr' drbdsetup.c:431: error: invalid application of `sizeof' to
> incomplete type `nlmsghdr' drbdsetup.c: In function `generic_config_cmd':
>
> This worked before you removed the -I$(KDIR) from CFLAGS -- I'm thinking
> you need to keep this to support cross-compiling DRBD... it certainly works
> for me when I add that line back into the makefile...

Hmmm, __u32 gets defined in my /usr/include/asm-i386/types.h and the
nlmsg things get defined in my /usr/include/linux/netlink.h .

I have used debian and ubuntu systems so far.

What distribution are you using ?
What is the content of  /usr/include/linux/netlink.h 
and /usr/include/asm/types.h on your distri ?

-Philipp
-- 
: Dipl-Ing Philipp Reisner                      Tel +43-1-8178292-50 :
: LINBIT Information Technologies GmbH          Fax +43-1-8178292-82 :
: Schönbrunnerstr 244, 1120 Vienna, Austria    http://www.linbit.com :


More information about the drbd-dev mailing list