Re: [FFmpeg-devel] [PATCH] avdevice: Fix ioctl method signature for Android builds

2018-10-22 Thread Michael Niedermayer
On Mon, Oct 22, 2018 at 05:40:21PM +0100, Don Turner wrote:
> When compiling avdevice for Android I received a compile error from
> libavdevice/v4l2.c. Full details in the 2nd part of this answer:
> https://stackoverflow.com/questions/52896607/why-do-i-get-error-invalid-instruction-mnemonic-when-compiling-ffmpeg-for-and/52900973#52900973
> 
> Patch below:
> 
> diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
> index 10a0ff0dd6..1b9c6e760b 100644
> --- a/libavdevice/v4l2.c
> +++ b/libavdevice/v4l2.c
> @@ -95,7 +95,11 @@ struct video_data {
>  int (*open_f)(const char *file, int oflag, ...);
>  int (*close_f)(int fd);
>  int (*dup_f)(int fd);
> +#ifdef __GLIBC__
>  int (*ioctl_f)(int fd, unsigned long int request, ...);
> +#else
> +int (*ioctl_f)(int fd, int request, ...);
> +#endif
>  ssize_t (*read_f)(int fd, void *buffer, size_t n);
>  void *(*mmap_f)(void *start, size_t length, int prot, int flags, int
> fd, int64_t offset);
>  int (*munmap_f)(void *_start, size_t length);

this patch is corrupted by new lines, check your line/word wrap settings


[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Opposition brings concord. Out of discord comes the fairest harmony.
-- Heraclitus


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avdevice: Fix ioctl method signature for Android builds

2018-10-22 Thread Carl Eugen Hoyos
2018-10-22 18:40 GMT+02:00, Don Turner :
> When compiling avdevice for Android I received a compile error from
> libavdevice/v4l2.c.

I only get a warning here.

> Full details in the 2nd part of this answer:
> https://stackoverflow.com/questions/52896607/why-do-i-get-error-invalid-instruction-mnemonic-when-compiling-ffmpeg-for-and/52900973#52900973
>
> Patch below:
>
> diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
> index 10a0ff0dd6..1b9c6e760b 100644
> --- a/libavdevice/v4l2.c
> +++ b/libavdevice/v4l2.c
> @@ -95,7 +95,11 @@ struct video_data {
>  int (*open_f)(const char *file, int oflag, ...);
>  int (*close_f)(int fd);
>  int (*dup_f)(int fd);
> +#ifdef __GLIBC__
>  int (*ioctl_f)(int fd, unsigned long int request, ...);
> +#else
> +int (*ioctl_f)(int fd, int request, ...);
> +#endif

Is this better than checking for target-os "android"?

Carl Eugen
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] avdevice: Fix ioctl method signature for Android builds

2018-10-22 Thread Don Turner
When compiling avdevice for Android I received a compile error from
libavdevice/v4l2.c. Full details in the 2nd part of this answer:
https://stackoverflow.com/questions/52896607/why-do-i-get-error-invalid-instruction-mnemonic-when-compiling-ffmpeg-for-and/52900973#52900973

Patch below:

diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index 10a0ff0dd6..1b9c6e760b 100644
--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@ -95,7 +95,11 @@ struct video_data {
 int (*open_f)(const char *file, int oflag, ...);
 int (*close_f)(int fd);
 int (*dup_f)(int fd);
+#ifdef __GLIBC__
 int (*ioctl_f)(int fd, unsigned long int request, ...);
+#else
+int (*ioctl_f)(int fd, int request, ...);
+#endif
 ssize_t (*read_f)(int fd, void *buffer, size_t n);
 void *(*mmap_f)(void *start, size_t length, int prot, int flags, int
fd, int64_t offset);
 int (*munmap_f)(void *_start, size_t length);


---
Don Turner | Developer Advocate | dontur...@google.com | +44 7939 287199
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel