photoid

welcome to cia's www public space




current directory: /site_root/knowledge/

did you know?

answers to weird things i am being hit with every day

Discuss this article on forums

Tags: what is this thing 


Table Of Contents
recompiling a kernel module, compiling a new one
the __P() C macro


go to your module dir
run:
[CODE]
make oldconfig && make prepare
pushd /usr/src/linux
make prepare2
make prepare1
make scripts
popd
make -C /usr/src/linux SUBDIRS=`pwd` modules
[/CODE]


if you read sys code a lot you may see pretty often code like this:
void (*func) __P((type *, other *))
__P() is a macro defined to keep the code understandable by old non-ANSI compilers and it looks like this (BSD code):

#undef __P
#ifndef __P
#if __STDC__
#define __P(protos) protos
#else
#define __P(protos) ()
#endif
#endif