8

Using linux/types.h in user programs, or stdint.h in driver module code...does it matter?

view full story
linux-howto

http://stackoverflow.com – I'm developing a device driver module and associated user libraries to handle the ioctl() calls. The library takes the pertinent info and puts it into a struct, which gets passed into the driver module and unpacked there and then dealt with (I'm omitting a lot of steps, but that's the overall idea). Some of the data being passed through the struct via the ioctl() is uint32_t type. I've discovered that that type is defined in stdint.h AND linux/types.h. So far I've been using linux/types.h to define that value, including down in the user libraries. But I understand it is bad form to use li (HowTos)