You're supposed to use proc_pid(proc_t)
for this. The structure is meant to be opaque as, if it gets changed between kernel revisions, your code could be accessing the incorrect offset.
I would only include the definitions for structures if I'm doing something nefarious, otherwise I'd go looking for a functional interface.