]> git.ipfire.org Git - thirdparty/glibc.git/commit
linux: Update the mremap C implementation [BZ #31968]
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 24 Jul 2024 21:05:13 +0000 (14:05 -0700)
committerFlorian Weimer <fweimer@redhat.com>
Thu, 1 Aug 2024 15:16:57 +0000 (17:16 +0200)
commit7459b6fe4773ff36d20e6f0890d6e40fbd803ea2
tree6999a4f50d7107c76a44fa5c72430a17104151f7
parent461d0cac386a766ad503fe392eb168401bc7c360
linux: Update the mremap C implementation [BZ #31968]

Update the mremap C implementation to support the optional argument for
MREMAP_DONTUNMAP added in Linux 5.7 since it may not always be correct
to implement a variadic function as a non-variadic function on all Linux
targets.  Return MAP_FAILED and set errno to EINVAL for unknown flag bits.
This fixes BZ #31968.

Note: A test must be added when a new flag bit is introduced.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
(cherry picked from commit 6c40cb0e9f893d49dc7caee580a055de53562206)
NEWS
sysdeps/unix/sysv/linux/mremap.c