Re: [PATCH v4l-utils v1 1/2] v4l2-tracer: wrap open64/mmap64 functions only if linux && __GLIBC__

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ups..., wrong command line resulted in resend of old patches, please ignore
and sorry for the noise...

Regards,
Peter


On Thu, 16 Nov 2023 13:19:46 +0100, Peter Seiderer <ps.report@xxxxxxx> wrote:

> Wrap open64/mmap64 functions only if linux && __GLIBC__, as done
> in lib/libv4l1/v4l1comapt.c and lib/libv4l2/v4l2convert.c since
> commit 'libv4l: Wrap LFS64 functions only if linux && __GLIBC__'
> (403a4e2697a1ff96fe2fa16589039595f21cadf0), should fix musl libc
> compile.
>
> Signed-off-by: Peter Seiderer <ps.report@xxxxxxx>
> ---
>  utils/v4l2-tracer/libv4l2tracer.cpp | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/utils/v4l2-tracer/libv4l2tracer.cpp b/utils/v4l2-tracer/libv4l2tracer.cpp
> index a9f039c7..68f6304a 100644
> --- a/utils/v4l2-tracer/libv4l2tracer.cpp
> +++ b/utils/v4l2-tracer/libv4l2tracer.cpp
> @@ -89,6 +89,7 @@ int open(const char *path, int oflag, ...)
>  	return fd;
>  }
>
> +#if defined(linux) && defined(__GLIBC__)
>  int open64(const char *path, int oflag, ...)
>  {
>  	errno = 0;
> @@ -124,6 +125,7 @@ int open64(const char *path, int oflag, ...)
>
>  	return fd;
>  }
> +#endif
>
>  int close(int fd)
>  {
> @@ -177,6 +179,7 @@ void *mmap(void *addr, size_t len, int prot, int flags, int fildes, off_t off)
>  	return buf_address_pointer;
>  }
>
> +#if defined(linux) && defined(__GLIBC__)
>  void *mmap64(void *addr, size_t len, int prot, int flags, int fildes, off_t off)
>  {
>  	errno = 0;
> @@ -191,6 +194,7 @@ void *mmap64(void *addr, size_t len, int prot, int flags, int fildes, off_t off)
>
>  	return buf_address_pointer;
>  }
> +#endif
>
>  int munmap(void *start, size_t length)
>  {






[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux