Skip to content
Commits on Source (12)
......@@ -65,6 +65,32 @@ glibc (2.30-0experimental0) experimental; urgency=medium
 
-- Aurelien Jarno <aurel32@debian.org> Fri, 06 Dec 2019 23:18:04 +0100
 
glibc (2.29-7) unstable; urgency=medium
[ Samuel Thibault ]
* patches/hurd-i386/git-altstack-RPC.diff: Fix restoring from altstack while
blocked in an RPC.
* patches/hurd-i386/git-getrandom.diff: Add support for getrandom &
getentropy.
[ Aurelien Jarno ]
* debian/rules.d/debhelper.mk: change dependency from libcrypt1-dev to
libcrypt-dev. Closes: #947778.
-- Aurelien Jarno <aurel32@debian.org> Mon, 30 Dec 2019 19:12:42 +0100
glibc (2.29-6) unstable; urgency=medium
* debian/shlibs-add-udebs: drop libcrypt.
* Fix rebootstrap and cross-toolchain-base (Closes: #946396):
- debian/control.in/libc: replace libcrypt1 by ${libcrypt:Depends} and
libcrypt1-dev by ${libcrypt-dev:Depends}.
- debian/rules.d/debhelper.mk: add libcrypt:Depends=libcrypt1 and
libcrypt-dev:Depends=libcrypt1-dev to substvars unless build with stage1
or stage2 profiles.
-- Aurelien Jarno <aurel32@debian.org> Tue, 10 Dec 2019 00:06:38 +0100
glibc (2.29-5) unstable; urgency=medium
 
* Upload to unstable.
......
......@@ -144,7 +144,7 @@ Architecture: amd64 arm64 armel armhf hppa i386 m68k mips mipsel mipsn32 mipsn32
Section: libs
Priority: optional
Multi-Arch: same
Depends: ${shlibs:Depends}, ${libgcc:Depends}, libcrypt1
Depends: ${shlibs:Depends}, ${libgcc:Depends}, ${libcrypt:Depends}
Recommends: libidn2-0 (>= 2.0.5~)
Suggests: glibc-doc, debconf | debconf-2.0, libc-l10n, locales [!hurd-i386]
Provides: libc6-sparcv9b [sparc sparc64], libc0.1-i686 [kfreebsd-i386], libc0.3-i686 [hurd-i386], libc6-i686 [i386]
......@@ -176,7 +176,7 @@ Architecture: amd64 arm64 armel armhf hppa i386 m68k mips mipsel mipsn32 mipsn32
Section: libdevel
Priority: optional
Multi-Arch: same
Depends: libc6 (= ${binary:Version}) <!stage1>, libc-dev-bin (= ${binary:Version}), ${misc:Depends}, linux-libc-dev [linux-any], kfreebsd-kernel-headers (>= 0.11) [kfreebsd-any], gnumach-dev [hurd-i386], hurd-dev (>= 20080607-3) [hurd-i386] | hurd-headers-dev [hurd-i386], libcrypt1-dev
Depends: libc6 (= ${binary:Version}) <!stage1>, libc-dev-bin (= ${binary:Version}), ${misc:Depends}, linux-libc-dev [linux-any], kfreebsd-kernel-headers (>= 0.11) [kfreebsd-any], gnumach-dev [hurd-i386], hurd-dev (>= 20080607-3) [hurd-i386] | hurd-headers-dev [hurd-i386], ${libcrypt-dev:Depends}
Replaces: hurd-dev (<< 20120408-3) [hurd-i386], kfreebsd-kernel-headers (<< 10.3~4) [kfreebsd-amd64 kfreebsd-i386]
Suggests: glibc-doc, manpages-dev
Provides: libc-dev, libc6-dev [alpha ia64 hurd-i386 kfreebsd-i386 kfreebsd-amd64]
......@@ -234,7 +234,7 @@ Architecture: alpha ia64
Section: libs
Priority: optional
Multi-Arch: same
Depends: ${shlibs:Depends}, ${libgcc:Depends}, libcrypt1
Depends: ${shlibs:Depends}, ${libgcc:Depends}, ${libcrypt:Depends}
Recommends: libidn2-0 (>= 2.0.5~)
Suggests: glibc-doc, debconf | debconf-2.0, libc-l10n, locales [!hurd-i386]
Provides: libc6-sparcv9b [sparc sparc64], libc0.1-i686 [kfreebsd-i386], libc0.3-i686 [hurd-i386], libc6-i686 [i386]
......@@ -266,7 +266,7 @@ Architecture: alpha ia64
Section: libdevel
Priority: optional
Multi-Arch: same
Depends: libc6.1 (= ${binary:Version}) <!stage1>, libc-dev-bin (= ${binary:Version}), ${misc:Depends}, linux-libc-dev [linux-any], kfreebsd-kernel-headers (>= 0.11) [kfreebsd-any], gnumach-dev [hurd-i386], hurd-dev (>= 20080607-3) [hurd-i386] | hurd-headers-dev [hurd-i386], libcrypt1-dev
Depends: libc6.1 (= ${binary:Version}) <!stage1>, libc-dev-bin (= ${binary:Version}), ${misc:Depends}, linux-libc-dev [linux-any], kfreebsd-kernel-headers (>= 0.11) [kfreebsd-any], gnumach-dev [hurd-i386], hurd-dev (>= 20080607-3) [hurd-i386] | hurd-headers-dev [hurd-i386], ${libcrypt-dev:Depends}
Replaces: hurd-dev (<< 20120408-3) [hurd-i386], kfreebsd-kernel-headers (<< 10.3~4) [kfreebsd-amd64 kfreebsd-i386]
Suggests: glibc-doc, manpages-dev
Provides: libc-dev, libc6-dev [alpha ia64 hurd-i386 kfreebsd-i386 kfreebsd-amd64]
......@@ -324,7 +324,7 @@ Architecture: hurd-i386
Section: libs
Priority: optional
Multi-Arch: same
Depends: ${shlibs:Depends}, ${libgcc:Depends}, libcrypt1
Depends: ${shlibs:Depends}, ${libgcc:Depends}, ${libcrypt:Depends}
Recommends: libidn2-0 (>= 2.0.5~)
Suggests: glibc-doc, debconf | debconf-2.0, libc-l10n, locales [!hurd-i386]
Provides: libc6-sparcv9b [sparc sparc64], libc0.1-i686 [kfreebsd-i386], libc0.3-i686 [hurd-i386], libc6-i686 [i386]
......@@ -356,7 +356,7 @@ Architecture: hurd-i386
Section: libdevel
Priority: optional
Multi-Arch: same
Depends: libc0.3 (= ${binary:Version}) <!stage1>, libc-dev-bin (= ${binary:Version}), ${misc:Depends}, linux-libc-dev [linux-any], kfreebsd-kernel-headers (>= 0.11) [kfreebsd-any], gnumach-dev [hurd-i386], hurd-dev (>= 20080607-3) [hurd-i386] | hurd-headers-dev [hurd-i386], libcrypt1-dev
Depends: libc0.3 (= ${binary:Version}) <!stage1>, libc-dev-bin (= ${binary:Version}), ${misc:Depends}, linux-libc-dev [linux-any], kfreebsd-kernel-headers (>= 0.11) [kfreebsd-any], gnumach-dev [hurd-i386], hurd-dev (>= 20080607-3) [hurd-i386] | hurd-headers-dev [hurd-i386], ${libcrypt-dev:Depends}
Replaces: hurd-dev (<< 20120408-3) [hurd-i386], kfreebsd-kernel-headers (<< 10.3~4) [kfreebsd-amd64 kfreebsd-i386]
Suggests: glibc-doc, manpages-dev
Provides: libc-dev, libc6-dev [alpha ia64 hurd-i386 kfreebsd-i386 kfreebsd-amd64]
......@@ -414,7 +414,7 @@ Architecture: kfreebsd-amd64 kfreebsd-i386
Section: libs
Priority: optional
Multi-Arch: same
Depends: ${shlibs:Depends}, ${libgcc:Depends}, libcrypt1
Depends: ${shlibs:Depends}, ${libgcc:Depends}, ${libcrypt:Depends}
Recommends: libidn2-0 (>= 2.0.5~)
Suggests: glibc-doc, debconf | debconf-2.0, libc-l10n, locales [!hurd-i386]
Provides: libc6-sparcv9b [sparc sparc64], libc0.1-i686 [kfreebsd-i386], libc0.3-i686 [hurd-i386], libc6-i686 [i386]
......@@ -446,7 +446,7 @@ Architecture: kfreebsd-amd64 kfreebsd-i386
Section: libdevel
Priority: optional
Multi-Arch: same
Depends: libc0.1 (= ${binary:Version}) <!stage1>, libc-dev-bin (= ${binary:Version}), ${misc:Depends}, linux-libc-dev [linux-any], kfreebsd-kernel-headers (>= 0.11) [kfreebsd-any], gnumach-dev [hurd-i386], hurd-dev (>= 20080607-3) [hurd-i386] | hurd-headers-dev [hurd-i386], libcrypt1-dev
Depends: libc0.1 (= ${binary:Version}) <!stage1>, libc-dev-bin (= ${binary:Version}), ${misc:Depends}, linux-libc-dev [linux-any], kfreebsd-kernel-headers (>= 0.11) [kfreebsd-any], gnumach-dev [hurd-i386], hurd-dev (>= 20080607-3) [hurd-i386] | hurd-headers-dev [hurd-i386], ${libcrypt-dev:Depends}
Replaces: hurd-dev (<< 20120408-3) [hurd-i386], kfreebsd-kernel-headers (<< 10.3~4) [kfreebsd-amd64 kfreebsd-i386]
Suggests: glibc-doc, manpages-dev
Provides: libc-dev, libc6-dev [alpha ia64 hurd-i386 kfreebsd-i386 kfreebsd-amd64]
......
......@@ -3,7 +3,7 @@ Architecture: @archs@
Section: libs
Priority: optional
Multi-Arch: same
Depends: ${shlibs:Depends}, ${libgcc:Depends}, libcrypt1
Depends: ${shlibs:Depends}, ${libgcc:Depends}, ${libcrypt:Depends}
Recommends: libidn2-0 (>= 2.0.5~)
Suggests: glibc-doc, debconf | debconf-2.0, libc-l10n, locales [!hurd-i386]
Provides: libc6-sparcv9b [sparc sparc64], libc0.1-i686 [kfreebsd-i386], libc0.3-i686 [hurd-i386], libc6-i686 [i386]
......@@ -35,7 +35,7 @@ Architecture: @archs@
Section: libdevel
Priority: optional
Multi-Arch: same
Depends: @libc@ (= ${binary:Version}) <!stage1>, libc-dev-bin (= ${binary:Version}), ${misc:Depends}, linux-libc-dev [linux-any], kfreebsd-kernel-headers (>= 0.11) [kfreebsd-any], gnumach-dev [hurd-i386], hurd-dev (>= 20080607-3) [hurd-i386] | hurd-headers-dev [hurd-i386], libcrypt1-dev
Depends: @libc@ (= ${binary:Version}) <!stage1>, libc-dev-bin (= ${binary:Version}), ${misc:Depends}, linux-libc-dev [linux-any], kfreebsd-kernel-headers (>= 0.11) [kfreebsd-any], gnumach-dev [hurd-i386], hurd-dev (>= 20080607-3) [hurd-i386] | hurd-headers-dev [hurd-i386], ${libcrypt-dev:Depends}
Replaces: hurd-dev (<< 20120408-3) [hurd-i386], kfreebsd-kernel-headers (<< 10.3~4) [kfreebsd-amd64 kfreebsd-i386]
Suggests: glibc-doc, manpages-dev
Provides: libc-dev, libc6-dev [alpha ia64 hurd-i386 kfreebsd-i386 kfreebsd-amd64]
......
commit e46efff89550a8e693a3362976f85070762c5cb8
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date: Wed Dec 11 00:23:00 2019 +0100
hurd: Fix using altstack while in an RPC call to be aborted
* sysdeps/mach/hurd/i386/trampoline.c (_hurd_setup_sighandler): Always check
for interrupted code being with esp pointing at mach_msg arguments, even
when using an altstack. If we need to abort the RPC we will need
this.
diff --git a/sysdeps/mach/hurd/i386/trampoline.c b/sysdeps/mach/hurd/i386/trampoline.c
index a6928a607b6..0c5d5a194c1 100644
--- a/sysdeps/mach/hurd/i386/trampoline.c
+++ b/sysdeps/mach/hurd/i386/trampoline.c
@@ -74,12 +74,6 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
interrupted RPC frame. */
state->basic.esp = state->basic.uesp;
- if ((ss->actions[signo].sa_flags & SA_ONSTACK)
- && !(ss->sigaltstack.ss_flags & (SS_DISABLE|SS_ONSTACK)))
- {
- sigsp = ss->sigaltstack.ss_sp + ss->sigaltstack.ss_size;
- ss->sigaltstack.ss_flags |= SS_ONSTACK;
- }
/* This code has intimate knowledge of the special mach_msg system call
done in intr-msg.c; that code does (see intr-msg.h):
movl %esp, %ecx
@@ -91,13 +85,20 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
We must check for the window during which %esp points at the
mach_msg arguments. The space below until %ecx is used by
the _hurd_intr_rpc_mach_msg frame, and must not be clobbered. */
- else if (state->basic.eip >= (int) &_hurd_intr_rpc_msg_cx_sp
- && state->basic.eip < (int) &_hurd_intr_rpc_msg_sp_restored)
- /* The SP now points at the mach_msg args, but there is more stack
- space used below it. The real SP is saved in %ecx; we must push the
- new frame below there, and restore that value as the SP on
- sigreturn. */
- sigsp = (char *) (state->basic.uesp = state->basic.ecx);
+ if (state->basic.eip >= (int) &_hurd_intr_rpc_msg_cx_sp
+ && state->basic.eip < (int) &_hurd_intr_rpc_msg_sp_restored)
+ /* The SP now points at the mach_msg args, but there is more stack
+ space used below it. The real SP is saved in %ecx; we must push the
+ new frame below there (if not on the altstack), and restore that value as
+ the SP on sigreturn. */
+ state->basic.uesp = state->basic.ecx;
+
+ if ((ss->actions[signo].sa_flags & SA_ONSTACK)
+ && !(ss->sigaltstack.ss_flags & (SS_DISABLE|SS_ONSTACK)))
+ {
+ sigsp = ss->sigaltstack.ss_sp + ss->sigaltstack.ss_size;
+ ss->sigaltstack.ss_flags |= SS_ONSTACK;
+ }
else
sigsp = (char *) state->basic.uesp;
commit c1f25758c353fcb16076512aba62746bff2e0d2d
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date: Fri Dec 13 03:23:14 2019 +0100
hurd: Implement __close_nocancel_nostatus
* sysdeps/mach/hurd/not-cancel.h: New file.
commit fe75ee0ca65536352fcdaebfbf39aac9bee271f0
Author: Andrew Eggenberger <andrew.eggenberger@gmail.com>
Date: Tue Oct 29 23:19:32 2019 -0500
hurd: add getrandom and getentropy implementations
* sysdeps/mach/hurd/getentropy.c: New file.
* sysdeps/mach/hurd/getrandom.c: Likewise.
commit 186e119bbd4a10895429ffe405ae96dc5c5634b8 (HEAD -> master, origin-rw/master)
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date: Fri Dec 13 03:32:21 2019 +0100
hurd: Fix __close_nocancel_nostatus availability
Not only libc/rtld use __close_nocancel_nostatus.
* sysdeps/mach/hurd/Makefile [$(subdir) == io] (sysdep_routines): Add
close_nocancel_nostatus.
* sysdeps/mach/hurd/Versions (libc): Add __close_nocancel_nostatus to
GLIBC_PRIVATE.
* sysdeps/mach/hurd/not-cancel.h (__close_nocancel_nostatus): Declare
function instead of defining inline.
[IS_IN (libc) || IS_IN (rtld)] (__close_nocancel_nostatus): Make
function hidden.
* sysdeps/mach/hurd/close_nocancel_nostatus.c: New file.
commit 8eaf34eda256ba3647ed6e7ed5c7c9aa19955d17
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date: Fri Dec 13 10:10:59 2019 +0100
hurd: Fix local PLT
* include/sys/random.h (__getrandom): Add hidden prototype.
* stdlib/getrandom.c (getrandom): Rename to hidden definition __getrandom.
Add weak alias.
* sysdeps/mach/hurd/getrandom.c (getrandom): Likewise.
* sysdeps/unix/sysv/linux/getrandom.c (getrandom): Likewise.
* sysdeps/mach/hurd/getentropy.c (getentropy): Use __getrandom instead of
getrandom.
commit a45244ce127763872ff0b5743fb4ac8299ee9b28
Author: James Clarke <jrtc27@jrtc27.com>
Date: Tue Dec 17 18:29:29 2019 +0000
hurd: Make getrandom honour GRND_NONBLOCK
* sysdeps/mach/hurd/getrandom.c (__getrandom): Open the random source
with O_NONBLOCK when the GRND_NONBLOCK flag is provided.
Message-Id: <20191217182929.90989-1-jrtc27@jrtc27.com>
---
include/sys/random.h | 11 ++++
stdlib/getrandom.c | 6 +-
sysdeps/mach/hurd/Makefile | 2
sysdeps/mach/hurd/Versions | 1
sysdeps/mach/hurd/close_nocancel_nostatus.c | 30 +++++++++++++
sysdeps/mach/hurd/getentropy.c | 64 ++++++++++++++++++++++++++++
sysdeps/mach/hurd/getrandom.c | 50 +++++++++++++++++++++
sysdeps/mach/hurd/not-cancel.h | 62 +++++++++++++++++++++++++++
sysdeps/unix/sysv/linux/getrandom.c | 6 +-
9 files changed, 227 insertions(+), 5 deletions(-)
--- /dev/null
+++ b/sysdeps/mach/hurd/not-cancel.h
@@ -0,0 +1,62 @@
+/* Uncancelable versions of cancelable interfaces. Hurd version.
+ Copyright (C) 2003-2019 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
+
+ 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
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef NOT_CANCEL_H
+# define NOT_CANCEL_H
+
+#include <fcntl.h>
+#include <unistd.h>
+#include <sys/wait.h>
+#include <time.h>
+#include <sys/uio.h>
+#include <hurd.h>
+#include <hurd/fd.h>
+
+/* For now we have none. Map the name to the normal functions. */
+#define __open_nocancel(...) \
+ __open (__VA_ARGS__)
+#define __open64_nocancel(...) \
+ __open64 (__VA_ARGS__)
+#define __openat_nocancel(...) \
+ __openat (__VA_ARGS__)
+#define __openat64_nocancel(...) \
+ __openat64 (__VA_ARGS__)
+#define __close_nocancel(fd) \
+ __close (fd)
+
+void __close_nocancel_nostatus (int fd);
+
+#define __read_nocancel(fd, buf, n) \
+ __read (fd, buf, n)
+#define __pread64_nocancel(fd, buf, count, offset) \
+ __pread64 (fd, buf, count, offset)
+#define __write_nocancel(fd, buf, n) \
+ __write (fd, buf, n)
+#define __writev_nocancel_nostatus(fd, iov, n) \
+ (void) __writev (fd, iov, n)
+# define __waitpid_nocancel(pid, stat_loc, options) \
+ __waitpid (pid, stat_loc, options)
+#define __fcntl64_nocancel(fd, cmd, ...) \
+ __fcntl64 (fd, cmd, __VA_ARGS__)
+
+#if IS_IN (libc) || IS_IN (rtld)
+hidden_proto (__close_nocancel_nostatus)
+#endif
+
+#endif /* NOT_CANCEL_H */
--- /dev/null
+++ b/sysdeps/mach/hurd/getentropy.c
@@ -0,0 +1,64 @@
+/* Implementation of getentropy based on getrandom.
+ Copyright (C) 2016-2019 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
+ <https://www.gnu.org/licenses/>. */
+
+#include <sys/random.h>
+#include <assert.h>
+#include <errno.h>
+#include <unistd.h>
+
+/* Write LENGTH bytes of randomness starting at BUFFER. Return 0 on
+ success and -1 on failure. */
+int
+getentropy (void *buffer, size_t length)
+{
+ /* The interface is documented to return EIO for buffer lengths
+ longer than 256 bytes. */
+ if (length > 256)
+ {
+ __set_errno (EIO);
+ return -1;
+ }
+
+ /* Try to fill the buffer completely. Even with the 256 byte limit
+ above, we might still receive an EINTR error (when blocking
+ during boot). */
+ void *end = buffer + length;
+ while (buffer < end)
+ {
+ /* NB: No cancellation point. */
+ ssize_t bytes = __getrandom (buffer, end - buffer, 0);
+ if (bytes < 0)
+ {
+ if (errno == EINTR)
+ /* Try again if interrupted by a signal. */
+ continue;
+ else
+ return -1;
+ }
+ if (bytes == 0)
+ {
+ /* No more bytes available. This should not happen under
+ normal circumstances. */
+ __set_errno (EIO);
+ return -1;
+ }
+ /* Try again in case of a short read. */
+ buffer += bytes;
+ }
+ return 0;
+}
--- /dev/null
+++ b/sysdeps/mach/hurd/getrandom.c
@@ -0,0 +1,50 @@
+/* Hurdish implementation of getrandom
+ Copyright (C) 2016-2019 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
+ <https://www.gnu.org/licenses/>. */
+
+#include <sys/random.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <not-cancel.h>
+
+/* Write up to LENGTH bytes of randomness starting at BUFFER.
+ Return the number of bytes written, or -1 on error. */
+ssize_t
+__getrandom (void *buffer, size_t length, unsigned int flags)
+{
+ const char *random_source = "/dev/urandom";
+ int open_flags = O_RDONLY | O_CLOEXEC;
+ size_t amount_read;
+ int fd;
+
+ if (flags & GRND_RANDOM)
+ random_source = "/dev/random";
+
+ if (flags & GRND_NONBLOCK)
+ open_flags |= O_NONBLOCK;
+
+ fd = __open_nocancel(random_source, open_flags);
+ if (fd == -1)
+ return -1;
+
+ amount_read = __read_nocancel(fd, buffer, length);
+ __close_nocancel_nostatus(fd);
+ return amount_read;
+}
+
+libc_hidden_def (__getrandom)
+weak_alias (__getrandom, getrandom)
--- a/sysdeps/mach/hurd/Makefile
+++ b/sysdeps/mach/hurd/Makefile
@@ -196,7 +196,7 @@ sysdep_routines += cthreads
endif
ifeq (io, $(subdir))
-sysdep_routines += f_setlk
+sysdep_routines += f_setlk close_nocancel_nostatus
endif
ifeq ($(subdir),sunrpc)
--- a/sysdeps/mach/hurd/Versions
+++ b/sysdeps/mach/hurd/Versions
@@ -13,6 +13,7 @@ libc {
__libc_lock_self0;
_dl_init_first;
+ __close_nocancel_nostatus;
}
}
--- /dev/null
+++ b/sysdeps/mach/hurd/close_nocancel_nostatus.c
@@ -0,0 +1,30 @@
+/* Copyright (C) 1991-2019 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
+ <https://www.gnu.org/licenses/>. */
+
+#include <errno.h>
+#include <unistd.h>
+#include <hurd.h>
+#include <hurd/fd.h>
+#include <not-cancel.h>
+
+/* Close the file descriptor FD. */
+void
+__close_nocancel_nostatus (int fd)
+{
+ HURD_FD_USE (fd, _hurd_fd_close (descriptor));
+}
+libc_hidden_def (__close_nocancel_nostatus)
--- a/include/sys/random.h
+++ b/include/sys/random.h
@@ -1,1 +1,11 @@
+#ifndef _SYS_RANDOM_H
#include <stdlib/sys/random.h>
+
+# ifndef _ISOMAC
+
+extern ssize_t __getrandom (void *__buffer, size_t __length,
+ unsigned int __flags) __wur;
+libc_hidden_proto (__getrandom)
+
+# endif /* !_ISOMAC */
+#endif
--- a/stdlib/getrandom.c
+++ b/stdlib/getrandom.c
@@ -22,10 +22,12 @@
/* Write up to LENGTH bytes of randomness starting at BUFFER.
Return the number of bytes written, or -1 on error. */
ssize_t
-getrandom (void *buffer, size_t length, unsigned int flags)
+__getrandom (void *buffer, size_t length, unsigned int flags)
{
__set_errno (ENOSYS);
return -1;
}
-
stub_warning (getrandom)
+
+libc_hidden_def (__getrandom)
+weak_alias (__getrandom, getrandom)
--- a/sysdeps/unix/sysv/linux/getrandom.c
+++ b/sysdeps/unix/sysv/linux/getrandom.c
@@ -25,7 +25,7 @@
/* Write up to LENGTH bytes of randomness starting at BUFFER.
Return the number of bytes written, or -1 on error. */
ssize_t
-getrandom (void *buffer, size_t length, unsigned int flags)
+__getrandom (void *buffer, size_t length, unsigned int flags)
{
return SYSCALL_CANCEL (getrandom, buffer, length, flags);
}
@@ -33,7 +33,7 @@ getrandom (void *buffer, size_t length,
/* Always provide a definition, even if the kernel headers lack the
system call number. */
ssize_t
-getrandom (void *buffer, size_t length, unsigned int flags)
+__getrandom (void *buffer, size_t length, unsigned int flags)
{
/* Ideally, we would add a cancellation point here, but we currently
cannot do so inside libc. */
@@ -41,3 +41,5 @@ getrandom (void *buffer, size_t length,
return -1;
}
#endif
+libc_hidden_def (__getrandom)
+weak_alias (__getrandom, getrandom)
......@@ -33,6 +33,8 @@ arm/local-arm-futex.diff
hppa/local-inlining.diff
hurd-i386/git-ONSTACK.diff
hurd-i386/git-getrandom.diff
hurd-i386/git-altstack-RPC.diff
hurd-i386/local-enable-ldconfig.diff
hurd-i386/git-context_functions.diff
hurd-i386/tg-sysvshm.diff
......
......@@ -155,8 +155,10 @@ endif
# Generate common substvars files.
: > tmp.substvars
ifeq ($(filter stage2,$(DEB_BUILD_PROFILES)),)
ifeq ($(filter stage1 stage2,$(DEB_BUILD_PROFILES)),)
echo 'libgcc:Depends=libgcc1 [!hppa !m68k], libgcc2 [m68k], libgcc4 [hppa]' >> tmp.substvars
echo 'libcrypt:Depends=libcrypt1' >> tmp.substvars
echo 'libcrypt-dev:Depends=libcrypt-dev' >> tmp.substvars
endif
for pkg in $(DEB_ARCH_REGULAR_PACKAGES) $(DEB_INDEP_REGULAR_PACKAGES) $(DEB_UDEB_PACKAGES); do \
cp tmp.substvars debian/$$pkg.substvars; \
......
......@@ -36,7 +36,7 @@ W="[^[:space:]]*"
# The following lists should match the ones in the *-udeb.install files
# in debian/debhelper.in; $W replaces any "*" wildcards there.
expr_libc1="ld$W libm-$W libm libdl$W libresolv$W libc-$W libc"
expr_libc2="libutil$W libcrypt$W librt$W libpthread$W libmvec$W"
expr_libc2="libutil$W librt$W libpthread$W libmvec$W"
expr_libc3="libnss_dns$W libnss_files$W"
expr_hurd="libmachuser$W libhurduser$W"
......