Most often (usually), when make can't fine a source file for compiling, it'll usually mention where it was expecting to find it. And usually it would be something like /usr/src/uname -r/include/asm-generic/resource.h. After all, your compiling using the same source as your kernel, therefore it should be looking in the source directory. Here is the RMLIMIT_NICE line in my resource.h file in that directory:
#define RLIMIT_NICE 13 /* max nice prio allowed to raise to
If according to make's errors it is not in/or looking at this directory, you'll need to make changes in the file from your PAM source that's calling for it which should be mentioned prior to the error message. Maybe you should post the command you issued and all the output that followed to the point this error get's printed on screen.