--- libc/sysdeps/linux/common/bits/in.h.orig	2010-08-11 20:57:17.000000000 +0200
+++ libc/sysdeps/linux/common/bits/in.h	2010-08-11 21:04:06.000000000 +0200
@@ -105,13 +105,23 @@
    The first word in the comment at the right is the data type used;
    "bool" means a boolean value stored in an `int'.  */
 #define IPV6_ADDRFORM		1
+#define IPV6_CHECKSUM		7
+ #include <linux/version.h>
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,14)
 #define IPV6_2292PKTINFO	2
 #define IPV6_2292HOPOPTS	3
 #define IPV6_2292DSTOPTS	4
 #define IPV6_2292RTHDR		5
 #define IPV6_2292PKTOPTIONS	6
-#define IPV6_CHECKSUM		7
 #define IPV6_2292HOPLIMIT	8
+ #else
+#define IPV6_PKTINFO		2
+#define IPV6_HOPOPTS		3
+#define IPV6_DSTOPTS		4
+#define IPV6_RTHDR		5
+#define IPV6_PKTOPTIONS		6
+#define IPV6_HOPLIMIT		8
+ #endif
 
 #define SCM_SRCRT		IPV6_RXSRCRT
 
@@ -133,6 +143,8 @@
 #define IPV6_IPSEC_POLICY	34
 #define IPV6_XFRM_POLICY	35
 
+ #include <linux/version.h>
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,14)
 #define IPV6_RECVPKTINFO	49
 #define IPV6_PKTINFO		50
 #define IPV6_RECVHOPLIMIT	51
@@ -147,6 +159,7 @@
 
 #define IPV6_RECVTCLASS		66
 #define IPV6_TCLASS		67
+ #endif
 
 /* Obsolete synonyms for the above.  */
 #define IPV6_ADD_MEMBERSHIP	IPV6_JOIN_GROUP
