Multiple definitions. Code issue

Pavel Roskin proski
Thu Apr 19 08:55:42 PDT 2007


On Thu, 2007-04-19 at 13:03 +0200, ahuguet at cttc.es wrote:

> first of all thanks for your help. I went working on my own, though,
> before I read your mail, and I've some questions:
> 
> > This means that every C file that includes that file will have its own
> > copy of last_data_rx.  Move it to one of the C files and use the
> > "extern" declaration in the header.
> 
> What I did, before reading your mail, was another thing that, apparently,
> worked. I made a new header file, that contained solely this declaration:
> struct sk_buff *last_data_rx;
> 
> Then, hostap_80211_rx.c is the only one to include said header. The
> multiple definition issue seems to be gone this way.
> 
> Does this solution differ from the one you're suggesting?

Yes, it does.  But I'm not going to teach you C programming in this
mailing list (or anywhere else).

-- 
Regards,
Pavel Roskin





More information about the Hostap mailing list