Question

I am trying to build a wireless driver which is eventually failing on an implicit declaration error:

wl_iw.c: In function 'wl_iw_set_priv':
wl_iw.c:7649:4: error: implicit declaration of function 'wl_iw_set_cscan' [-Werror=implicit-function-declaration]

Here is where it tries to call the function:

#if defined(CSCAN)

    else if (strnicmp(extra, CSCAN_COMMAND, strlen(CSCAN_COMMAND)) == 0)
        ret = wl_iw_set_cscan(dev, info, (union iwreq_data *)dwrq, extra);
#endif 

So, it seems like this will only be called if CSCAN is defined. Well, in the source file, wl_iw_set_cscan is also declared if CSCAN is declared (I believe). Here is where it is defined (github), and... if you scroll up a little bit, it only seems to be dependent on CSCAN being defined.

CSCAN is definitely defined, which is shown if I do a verbose build:

arm-linux-androideabi-gcc *snip* -DCSCAN *snip* -c -o /home/owner/android-wmon/core/compat-wireless-3.6-rc7-1/drivers/net/wireless/bcmdhd/wl_iw.o /home/owner/android-wmon/core/compat-wireless-3.6-rc7-1/drivers/net/wireless/bcmdhd/wl_iw.c

I can even be doubly sure by putting a "#define CSCAN" at the top of wl_iw.c and it will complain that it is defined twice. So I'm positive that CSCAN is defined.

If this is the case, why am I getting an implicit definition warning turned error? wl_iw_set_cscan should be defined since CSCAN is defined.

Était-ce utile?

La solution

At line 5781, there is another #define that is masking wl_iw_set_cscan.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top