From patchwork Thu Dec 6 22:37:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carl Eugen Hoyos X-Patchwork-Id: 11319 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 7B1FF44D634 for ; Fri, 7 Dec 2018 00:37:34 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id BFF6768A724; Fri, 7 Dec 2018 00:37:24 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-io1-f47.google.com (mail-io1-f47.google.com [209.85.166.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B4EDB68A643 for ; Fri, 7 Dec 2018 00:37:17 +0200 (EET) Received: by mail-io1-f47.google.com with SMTP id n9so1738105ioh.7 for ; Thu, 06 Dec 2018 14:37:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=Q6HYfetxdbbELziIJHQiBcYokK4KdXxjMhhQP9h3p3k=; b=NgUcG5e22NpL+nd2Ss5alGxSW0cMz5CH7yD3SzlUwxyfLrSq9iq0CAJOtihA2AHlLN wIN8GWedF1OgnAsIJ+he1LuxEobmZmN/+8wb2ciRLHvDbCRF+jZ3cFEAhtYQW05jnsLH i1eMqE6Hru+CtDlD0r+Zg6PSmuPw454b7uhIY4BLHukm5He4x4nzbcjMhKs8ht9LeZOG /Q8fYjtLD193vEVZIeLMmkQOsKRx5dsRca1d6g6CN6SAiuEoaKdXJiOw271dxirflUFW xoENUYz3HNb0n+cDcADFY2unicihCh66Q3MF0neNya5LU+gZR3RTBcKOZX2Eifp7jCJn L3LQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=Q6HYfetxdbbELziIJHQiBcYokK4KdXxjMhhQP9h3p3k=; b=bUUVQHro3YZZsYKIciWNv9+f6kXp+2JcD4wLVBP5ZkUKdvzCLzuKyvkbLRWumdOFnR EqW+Tu63qT5WIBSCChn29qWnweDmc2KpbOExJILEVYXVoa7lWSM9kbS/DHVLTrwuKXhT tWmptku8GIB9i24jHTvAk2WrV7eF9WbHhYKHAog/rxyNN2hpnR0ZS5JIRw8FBEqMjSC/ 7QFmgMe5RQSP92JANHlDFAzYZ9eoG94qnQcVpAMdpYs/9sV6oucowQntWImfTkun951D 7XTYC0uLku1SP8KOkajktsHXEfwx7ibJ5PtM7UpUZhbxYVLbokI6Q9AA2fOOhlKMJjPG EuCg== X-Gm-Message-State: AA+aEWb+ijfewWIGgjPaw6b8iWayy7NOreAGG3Ym/s7I1w7aoc5LDu3w jP0bK4jHAzFXYmIyauKsCY+k72Gz+JatIovOgdRgOg== X-Google-Smtp-Source: AFSGD/WwVd46R1FLsEXoPZJULh+HDNjNL+aQimBfDwNTIwhtK4UlYYxzB5ncWkVpGliWruRCJbcQNNFTShZpxFcitoo= X-Received: by 2002:a5e:c70d:: with SMTP id f13mr27281617iop.55.1544135845548; Thu, 06 Dec 2018 14:37:25 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a02:5f11:0:0:0:0:0 with HTTP; Thu, 6 Dec 2018 14:37:24 -0800 (PST) From: Carl Eugen Hoyos Date: Thu, 6 Dec 2018 23:37:24 +0100 Message-ID: To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] [PATCH]lavd/v4l2: Use ioctl(..., "int request" ) on Android X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Hi! Attached patch fixes building with new Android toolchain, used to be a warning. Please comment, Carl Eugen From d366c948af086520bfb2a4048e76f8d117690776 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Thu, 6 Dec 2018 23:34:54 +0100 Subject: [PATCH] lavd/v4l2: Use "int request" as second parameter for ioctl() on Android. Fixes build with new Android toolchain. --- libavdevice/v4l2.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c index 10a0ff0..aa7c052 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 __ANDROID__ + int (*ioctl_f)(int fd, int request, ...); +#else int (*ioctl_f)(int fd, unsigned long 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); -- 1.7.10.4