I'm trying to compile some of the milw0rm exploits on bt4 and getting a lot of errors, I'm assuming I'm missing libraries, is this the case if so what libraries do I need to compile the .c files or is there something else I'm missing? Here is the output I'm getting:

3094.c:19:24: error: sys/agpio.h: No such file or directory
3094.c: In function ‚usage‚:
3094.c:50: warning: incompatible implicit declaration of built-in function ‚printf‚
3094.c: At top level:
3094.c:57: warning: ‚struct kinfo_proc‚ declared inside parameter list
3094.c:57: warning: its scope is only this definition or declaration, which is probably not what you want
3094.c: In function ‚get_proc‚:
3094.c:62: error: ‚KERN_PROC‚ undeclared (first use in this function)
3094.c:62: error: (Each undeclared identifier is reported only once
3094.c:62: error: for each function it appears in.)
3094.c:63: error: ‚KERN_PROC_PID‚ undeclared (first use in this function)
3094.c:65: error: invalid application of ‚sizeof‚ to incomplete type ‚struct kinfo_proc‚
3094.c:68: warning: incompatible implicit declaration of built-in function ‚printf‚
3094.c: In function ‚main‚:
3094.c:79: error: storage size of ‚kp‚ isn‚t known
3094.c:81: warning: incompatible implicit declaration of built-in function ‚printf‚
3094.c:118: warning: format ‚%x‚ expects type ‚unsigned int‚, but argument 2 has type ‚void *‚
3094.c:120: error: ‚AGP_DEVICE‚ undeclared (first use in this function)

I'm relatively new to all this so don't be to harsh the command I'm running is gcc 3094.c -o 3094