Hi List,
I am trying to compile the kernel driver module for 3.11.7 (gentoo
hardened sources) using gcc-4.7.3. The card I am planning to use is a
Dosch&Amnand Com-On-Air PCI.
So far I have been able to change the patch file provided for the 3.0
kernels (http://dect.osmocom.org/attachment/wiki/Patches/linux-3.0.diff)
to apply to my kernel sources. There were a few changes required, but
nothing too drastic.
However, when I start the 'make' for the kernel the compiler issues an
error as follows:
[... snip ...]
CC kernel/module.o
In file included from include/net/dect/mac_ccf.h:12:0,
from include/net/dect/dect.h:148,
from drivers/dect/coa/sc1442x.c:19:
include/net/dect/mac.h:622:8: error: duplicate member ‘lbn’
include/net/dect/mac.h:624:9: error: duplicate member ‘pmid’
CC arch/x86/pci/bus_numa.o
CC fs/ext4/super.o
CC arch/x86/pci/amd_bus.o
make[3]: *** [drivers/dect/coa/sc1442x.o] Error 1
make[2]: *** [drivers/dect/coa] Error 2
make[1]: *** [drivers/dect] Error 2
make: *** [drivers] Error 2
make: *** Waiting for unfinished jobs....
CC arch/x86/power/cpu.o
[... snip ...]
Given that the related code within include/net/dect/mac.h looks as
follows (comments added by me), this seems to be a valid complaint of
the compiler:
[... snip ...]
struct dect_cctrl {
enum dect_cctrl_cmds cmd;
union {
struct {
u16 fmid;
u32 pmid; /* <=== pmid */
};
struct {
u8 lbn; /* <=== lbn */
u8 ecn;
u8 type;
u8 service;
u8 slot;
bool cf;
u8 a_mod;
u8 bz_mod;
u8 bz_ext_mod;
u8 acr;
};
struct {
u8 lbn; /* <=== lbn */
u8 reason;
u32 pmid; /* <=== pmid */
};
};
};
[... snip ...]
lbn and pmid are indeed defined twice. A research on the internet for
similar errors suggested that those constructs were tolerated (I don't
know how) by gcc versions prior to 4.5, but are no longer valid.
Is there any patch available or a suggestion on what I need to change in
order to successfully compile the driver.
Many thanks and regards,
KK
Just FYI: thanks to Holger dect.osmocom.org is back up again (and hopefully
will stay up).
I might merge the code with the 3.13 kernel during the next days.