diff options
author | Igor Pashev <igor.pashev@nexenta.com> | 2013-04-10 11:42:21 +0400 |
---|---|---|
committer | Igor Pashev <igor.pashev@nexenta.com> | 2013-04-10 11:42:21 +0400 |
commit | 3fd7c70391fef9a1593b25a808766c352239e958 (patch) | |
tree | 8ed845aca8afc7bf489028a31db0fdf5ad6ce680 /python2.7/patches/hurd-disable-nonworking-constants.diff | |
parent | 92b26142a3d204fb1ce30f68ba1dfdd7f92a0b36 (diff) | |
download | cibs-pkgs-3fd7c70391fef9a1593b25a808766c352239e958.tar.gz |
Adapt Debian patches
Diffstat (limited to 'python2.7/patches/hurd-disable-nonworking-constants.diff')
-rw-r--r-- | python2.7/patches/hurd-disable-nonworking-constants.diff | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/python2.7/patches/hurd-disable-nonworking-constants.diff b/python2.7/patches/hurd-disable-nonworking-constants.diff new file mode 100644 index 0000000..cfd5241 --- /dev/null +++ b/python2.7/patches/hurd-disable-nonworking-constants.diff @@ -0,0 +1,34 @@ +# DP: Comment out constant exposed on the API which are not implemented on +# DP: GNU/Hurd. They would not work at runtime anyway. + +--- a/Modules/posixmodule.c ++++ b/Modules/posixmodule.c +@@ -9193,12 +9193,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 +--- a/Modules/socketmodule.c ++++ b/Modules/socketmodule.c +@@ -4815,9 +4815,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 |