# DP: Comment out constant exposed on the API which are not implemented on # DP: GNU/Hurd. They would not work at runtime anyway. Index: python2.6-2.6.5+20100521/Modules/posixmodule.c =================================================================== --- python2.6-2.6.5+20100521.orig/Modules/posixmodule.c 2010-05-21 16:05:47.787739235 +0200 +++ python2.6-2.6.5+20100521/Modules/posixmodule.c 2010-05-21 16:07:53.296710141 +0200 @@ -8880,12 +8880,14 @@ #ifdef O_LARGEFILE if (ins(d, "O_LARGEFILE", (long)O_LARGEFILE)) return -1; #endif +#ifndef __GNU__ #ifdef O_SHLOCK if (ins(d, "O_SHLOCK", (long)O_SHLOCK)) return -1; #endif #ifdef O_EXLOCK if (ins(d, "O_EXLOCK", (long)O_EXLOCK)) return -1; #endif +#endif /* MS Windows */ #ifdef O_NOINHERIT Index: python2.6-2.6.5+20100521/Modules/socketmodule.c =================================================================== --- python2.6-2.6.5+20100521.orig/Modules/socketmodule.c 2010-05-21 16:05:47.811711908 +0200 +++ python2.6-2.6.5+20100521/Modules/socketmodule.c 2010-05-21 16:07:25.772711483 +0200 @@ -4685,9 +4685,11 @@ #ifdef SO_OOBINLINE PyModule_AddIntConstant(m, "SO_OOBINLINE", SO_OOBINLINE); #endif +#ifndef __GNU__ #ifdef SO_REUSEPORT PyModule_AddIntConstant(m, "SO_REUSEPORT", SO_REUSEPORT); #endif +#endif #ifdef SO_SNDBUF PyModule_AddIntConstant(m, "SO_SNDBUF", SO_SNDBUF); #endif