gcc compilation fails due to __KERNEL__ macro in mod_devicetable.h and linux/types.h
Hello!
Currently compilation of some packages (libsvga-1.4.3, dosemu 1.2.2) fails with errors in /include/mod_devicetable.h. Error messages sounds like "295: error: storage size of 'swbit" is not known" and "error: syntax error before '__u32'". I'm using Slackware 11 with 2.6.17.13 kernel. Those errors appear when program (the one that doesn't compile) use #include <pci.h>. Upon closer examination it look like problems are caused by those lines in mod_devicetable.h: Code:
#ifndef LINUX_MOD_DEVICETABLE_H The questions are: 1)I could just comment out __KERNEL__ lines, but wouldn't that break something somewhere else? Or must I just fix every program that use <pci.h>? 2)Is this behavior "normal"? (i've rebuilt kernel recently and I'm not sure if I didn't break something somewhere). |
Don't define __KERNEL__. It would include too many differet things you do not want. Instead, add #include <linux/types.h> to the files with #include <pci.h> (before that pci includes).
|
All times are GMT -5. The time now is 01:05 PM. |