Andrew Boyd(deleted)
|
RE: Error compiling network driver in QNX Momentics
|
Andrew Boyd(deleted)
11/26/2009 9:46 AM
post42661
|
RE: Error compiling network driver in QNX Momentics
> I include <io-pkt/iopkt_driver.h>
>
> field 'mii_media' has incomplete type
iopkt_driver.h is NOT meant to be a complete
list of header files, sufficient for all drivers
to compile. It's just a starting point.
For example, if we look at sys/dev_qnx/i82544/i82544.h:
-- cut --
396 #include <io-pkt/iopkt_driver.h>
397 #include <stdio.h>
398 #include <errno.h>
399 #include <atomic.h>
400 #include <unistd.h>
401 #include <stdlib.h>
402 #include <string.h>
403 #include <sys/mman.h>
404 #include <sys/types.h>
405 #include <sys/siginfo.h>
406 #include <sys/syspage.h>
407 #include <sys/neutrino.h>
408 #include <sys/mbuf.h>
409 #include <sys/syslog.h>
410
411 #include <net/if.h>
412 #include <net/if_dl.h>
413 #include <net/if_types.h>
414 #include <net/if_ether.h>
415 #include <net/if_media.h>
416 #include <sys/io-pkt.h>
417 #include <sys/cache.h>
418 #include <sys/callout.h>
419 #include <hw/inout.h>
420 #include <drvr/mdi.h>
421 #include <drvr/eth.h>
422 //#include <drvr/nicsupport.h>
423 #include <hw/nicinfo.h>
424 #include <sys/device.h>
425 #include <siglock.h>
426
427 #include <dev/mii/miivar.h>
428 #include <eeprom.h>
-- cut --
Now, I am not saying that you need all of
the above header files included for your
particular driver. You might need less.
You might need more, depending upon what
your particular driver does, and how it
does it.
But for this particular error, you might
look at including net/if_media.h
When you are writing drivers, it can really
really really help to look at the source of
other, similar drivers.
--
aboyd
--
aboyd
|
|
|