|And have you rebuilt libc with your new definition of struct stat? And then rebuilt all the programs that use libc (i.e. just about everything).|
Edit: Checking the kernel sources I found 128 references to "struct stat"; you will need to go through each of these references and then check every place where the variables they declare are used, then make the appropriate changes. Next, as I said before, you will have to recompile libc to use the new version of the stat struct (in particular in the system calls stat() and fstat(), but you also need to check for any other potential references). Then you need to recompile every program that uses libc - in other words, just about every program on the system - so that the new version of libc is used. Don't forget that these changes will mean that in future you will have to install any new programs by compiling them from source rather than downloading binaries.
Once you have done that, if you are very lucky, things may work. If not, by all means come back and report what errors you are getting - but you have to do the hard work first. Changing a basic kernel structure is not something to be undertaken lightly. What exactly are you trying to do? - I would be surprised if there is not a simpler solution.
message edited by ijack