I am make a program for a raspberry pi running Arch Linux. I need to set the size of a shared memory file. So I use ftruncate. But when I compile it, I get 'ftruncate’ was not declared in this scope. I have included unistd.h. I know its something stupid, I just can't figure it out. In case it matters, I am using the g++ compiler.
I just tried that and it is there, then I realized that the error was coming from a library that I made, that I didn't realize it was compiling. Yup, I'm an idiot. Thanks for your assistance.