[issue9060] Python/dup2.c doesn't compile on (at least) newlib
report at bugs.python.org
Wed Jun 23 11:51:33 CEST 2010
New submission from Torne Wuff <torne-pythonbugs at wolfpuppy.org.uk>:
On systems without dup2(), Python tries to compile its own from Python/dup2.c, but this file refers to close() without including unistd.h. This causes it to not compile with newlib (and possibly other C libraries, presumably it was relying on fcntl.h indirectly including it?).
This is probably true of all older versions as well, but Python 2.x doesn't appear to actually bother to compile dup2.c even if the system lacks dup2, so it doesn't actually cause a build error there.
(building python for a semi-freestanding environment is "fun")
components: Interpreter Core
title: Python/dup2.c doesn't compile on (at least) newlib
type: compile error
versions: Python 3.1
Added file: http://bugs.python.org/file17753/fix_dup2.patch
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list