I don't know how to install Linux header files. But for just one file, I wouldn't bother. It's much faster to do a quick hack: Change your source code to replace "#include <linux/types.h>" with "#include <mylinuxtypes.h>", and write a tiny header file in your project or directory that contains just the few types you really need. Or log in to a random Linux machine or look on the web, and make a copy of types.h from there; problem with that suggestion: that file probably includes another huge series of files, which end up being platform-specific, so you may have to copy a lot of other files there.
I think the best suggestion is actually to make the code portable, and you are already on the way there. You already fixed all the instances of __u8. Just remove the "#include <linux/types.h>", find out what breaks next, and fix it. When you are done, you'll have a non-Linux specific version of the source code.
If you want to do the world a favor: post the version somewhere. Perhaps it is an open source project, and you can feed your changes back to it? Or you can make it into a FreeBSD port? Or perhaps you can put it up on GitHub or such, so people can see it?