Re: [PATCH 3/4] Wrap LFS64 functions only if __GLIBC__

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

 



Em Sun, 25 Jan 2015 21:36:36 +0100
Felix Janda <felix.janda@xxxxxxxxx> escreveu:

> The functions open64 and mmap64 are glibc specific.
> 
> Signed-off-by: Felix Janda <felix.janda@xxxxxxxxx>
> ---
>  lib/libv4l1/v4l1compat.c  | 4 ++--
>  lib/libv4l2/v4l2convert.c | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/lib/libv4l1/v4l1compat.c b/lib/libv4l1/v4l1compat.c
> index 282173b..c78adb4 100644
> --- a/lib/libv4l1/v4l1compat.c
> +++ b/lib/libv4l1/v4l1compat.c
> @@ -61,7 +61,7 @@ LIBV4L_PUBLIC int open(const char *file, int oflag, ...)
>  	return fd;
>  }
>  
> -#ifdef linux
> +#ifdef __GLIBC__

Hmm... linux was added here to avoid breaking on FreeBSD, on this
changeset:

commit 9026d3cc277e9211a89345846dea95af7208383c
Author: hans@rhel5-devel.localdomain <hans@rhel5-devel.localdomain>
Date:   Tue Jun 2 15:34:34 2009 +0200

    libv4l: initial support for compiling on FreeBSD
    
    From: Hans Petter Selasky <hselasky@xxxxxxxxxxx>

I'm afraid that removing the above would break for FreeBSD, as I think
it also uses glibc, but not 100% sure.

So, either we should get an ack from Hans Peter, or you should
change the tests to:

	#if linux && __GLIBC__

Regards,
Mauro



>  LIBV4L_PUBLIC int open64(const char *file, int oflag, ...)
>  {
>  	int fd;
> @@ -120,7 +120,7 @@ LIBV4L_PUBLIC void *mmap(void *start, size_t length, int prot, int flags, int fd
>  	return v4l1_mmap(start, length, prot, flags, fd, offset);
>  }
>  
> -#ifdef linux
> +#ifdef __GLIBC__
>  LIBV4L_PUBLIC void *mmap64(void *start, size_t length, int prot, int flags, int fd,
>  		off64_t offset)
>  {
> diff --git a/lib/libv4l2/v4l2convert.c b/lib/libv4l2/v4l2convert.c
> index c79f9da..9345641 100644
> --- a/lib/libv4l2/v4l2convert.c
> +++ b/lib/libv4l2/v4l2convert.c
> @@ -86,7 +86,7 @@ LIBV4L_PUBLIC int open(const char *file, int oflag, ...)
>  	return fd;
>  }
>  
> -#ifdef linux
> +#ifdef __GLIBC__
>  LIBV4L_PUBLIC int open64(const char *file, int oflag, ...)
>  {
>  	int fd;
> @@ -148,7 +148,7 @@ LIBV4L_PUBLIC void *mmap(void *start, size_t length, int prot, int flags, int fd
>  	return v4l2_mmap(start, length, prot, flags, fd, offset);
>  }
>  
> -#ifdef linux
> +#ifdef __GLIBC__
>  LIBV4L_PUBLIC void *mmap64(void *start, size_t length, int prot, int flags, int fd,
>  		off64_t offset)
>  {
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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