public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Linux: Forward declaration of struct iovec for process_madvise
@ 2022-06-29 10:37 Florian Weimer
  2022-06-29 11:40 ` Adhemerval Zanella
  0 siblings, 1 reply; 2+ messages in thread
From: Florian Weimer @ 2022-06-29 10:37 UTC (permalink / raw)
  To: libc-alpha; +Cc: Adhemerval Zanella, Timm Bäder

This maintains compatibility between <sys/mman.h> and <linux/uio.h>.
Before that, the addition of process_madvise made those two header
files incompatible.  This has been observed resulting in a build
failure in LLDB's Process/Linux/NativeRegisterContextLinux_s390x.cpp
source file.

Fixes commit d19ee3473d68ca0e794f3a8b7677a0983ae1342e
("linux: Add process_madvise").

Tested on i686-linux-gnu, x86_64-linux-gnu.  Built with
build-many-glibs.py.

---
 sysdeps/unix/sysv/linux/bits/mman_ext.h | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/sysdeps/unix/sysv/linux/bits/mman_ext.h b/sysdeps/unix/sysv/linux/bits/mman_ext.h
index 97234a7adf..5612852e64 100644
--- a/sysdeps/unix/sysv/linux/bits/mman_ext.h
+++ b/sysdeps/unix/sysv/linux/bits/mman_ext.h
@@ -21,11 +21,8 @@
 #endif
 
 #ifdef __USE_GNU
-#include <bits/types/struct_iovec.h>
-
-/*
- */
-extern __ssize_t process_madvise (int __pid_fd, const struct iovec* __iov,
+struct iovec;
+extern __ssize_t process_madvise (int __pid_fd, const struct iovec *__iov,
 				  size_t __count, int __advice,
 				  unsigned __flags)
   __THROW;


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Linux: Forward declaration of struct iovec for process_madvise
  2022-06-29 10:37 [PATCH] Linux: Forward declaration of struct iovec for process_madvise Florian Weimer
@ 2022-06-29 11:40 ` Adhemerval Zanella
  0 siblings, 0 replies; 2+ messages in thread
From: Adhemerval Zanella @ 2022-06-29 11:40 UTC (permalink / raw)
  To: Florian Weimer; +Cc: libc-alpha, Timm Bäder



> On 29 Jun 2022, at 07:37, Florian Weimer <fweimer@redhat.com> wrote:
> 
> This maintains compatibility between <sys/mman.h> and <linux/uio.h>.
> Before that, the addition of process_madvise made those two header
> files incompatible.  This has been observed resulting in a build
> failure in LLDB's Process/Linux/NativeRegisterContextLinux_s390x.cpp
> source file.
> 
> Fixes commit d19ee3473d68ca0e794f3a8b7677a0983ae1342e
> ("linux: Add process_madvise").
> 
> Tested on i686-linux-gnu, x86_64-linux-gnu.  Built with
> build-many-glibs.py.

LGTM, thanks.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>

> 
> ---
> sysdeps/unix/sysv/linux/bits/mman_ext.h | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/sysdeps/unix/sysv/linux/bits/mman_ext.h b/sysdeps/unix/sysv/linux/bits/mman_ext.h
> index 97234a7adf..5612852e64 100644
> --- a/sysdeps/unix/sysv/linux/bits/mman_ext.h
> +++ b/sysdeps/unix/sysv/linux/bits/mman_ext.h
> @@ -21,11 +21,8 @@
> #endif
> 
> #ifdef __USE_GNU
> -#include <bits/types/struct_iovec.h>
> -
> -/*
> - */
> -extern __ssize_t process_madvise (int __pid_fd, const struct iovec* __iov,
> +struct iovec;
> +extern __ssize_t process_madvise (int __pid_fd, const struct iovec *__iov,
> 				  size_t __count, int __advice,
> 				  unsigned __flags)
>   __THROW;
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-06-29 11:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-29 10:37 [PATCH] Linux: Forward declaration of struct iovec for process_madvise Florian Weimer
2022-06-29 11:40 ` Adhemerval Zanella

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).