On Fri, Aug 5, 2011 at 5:10 PM, Akash <email2akashjain@gmail.com> wrote:
Use #if like
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33)
// New socket create function
#else
// Old socket create function
#endif
LINUX_VERSION_CODE is defined somewhere in the kernel and you should get to use it easily.
HTH
Akash