The next patch would create the file sysdeps/mach/hurd/spawn_int_def.h, which already exists! Applying it anyway. patching file sysdeps/mach/hurd/spawn_int_def.h Hunk #1 FAILED at 1. 1 out of 1 hunk FAILED -- saving rejects to file sysdeps/mach/hurd/spawn_int_def.h.rej patching file sysdeps/mach/hurd/spawni.c Hunk #1 succeeded at 518 with fuzz 1 (offset 13 lines). Hunk #2 FAILED at 628. 1 out of 2 hunks FAILED -- saving rejects to file sysdeps/mach/hurd/spawni.c.rej Reject file sysdeps/mach/hurd/spawn_int_def.h.rej: --- sysdeps/mach/hurd/spawn_int_def.h +++ sysdeps/mach/hurd/spawn_int_def.h @@ -0,0 +1,24 @@ +/* Internal definitions for posix_spawn functionality. Hurd version. + Copyright (C) 2021 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SPAWN_INT_DEF_H +#define _SPAWN_INT_DEF_H + +#define __SPAWN_SUPPORT_CLOSEFROM 1 + +#endif /* _SPAWN_INT_H */ Reject file sysdeps/mach/hurd/spawni.c.rej: --- sysdeps/mach/hurd/spawni.c +++ sysdeps/mach/hurd/spawni.c @@ -628,7 +641,7 @@ retry: break; case spawn_do_closefrom: - err = EINVAL; + err = do_closefrom (action->action.closefrom_action.from); break; }