From patchwork Tue Jan 22 16:37:22 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 14212 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 23D0223E39 for ; Tue, 22 Jan 2013 16:37:35 +0000 (UTC) Received: from mail-vb0-f44.google.com (mail-vb0-f44.google.com [209.85.212.44]) by fiordland.canonical.com (Postfix) with ESMTP id C6BC6A1834B for ; Tue, 22 Jan 2013 16:37:34 +0000 (UTC) Received: by mail-vb0-f44.google.com with SMTP id fc26so2591237vbb.3 for ; Tue, 22 Jan 2013 08:37:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=xpB39X8pRe3g4TDHvJgQGfNUa4dMxG7otFKxieGyvkg=; b=QoGE07qlBSlzgxbDm8a1hK6Q7W2rBnaW1XsAAlfpnEIo7eaL+Ynzg+IdtrmHbd4L18 iIVwVUd1u8BNyolAkmvhDuI82o1Jwa5IXLXRrLCRoYR2CSXLBwcSfhzO5236iCxSKfQq WTc9EevMhVD7ZmZS0Wc7otVDD03S5MVHbOUaPMM7Tx9msTDUFmfoCGVU8haqZdbHyvLh A+i92e382/XsY0U4GKCneSi6qZD/lkviddMD7nGo3yMUafdBbQ2AMcYYZlYtYpCl8Cf+ ScFYHsJhe/MI5cFpk6op+mBVN7SbpaLYVkRVHVrGMfYya3yWw5AO7XfJIeYkrrtxSa+1 Ic8Q== X-Received: by 10.220.209.74 with SMTP id gf10mr23928690vcb.10.1358872654289; Tue, 22 Jan 2013 08:37:34 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.145.101 with SMTP id st5csp260057veb; Tue, 22 Jan 2013 08:37:33 -0800 (PST) X-Received: by 10.195.13.11 with SMTP id eu11mr33776077wjd.39.1358872652445; Tue, 22 Jan 2013 08:37:32 -0800 (PST) Received: from afflict.kos.to (afflict.kos.to. [92.243.29.197]) by mx.google.com with ESMTPS id h7si12090912eei.207.2013.01.22.08.37.29 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 22 Jan 2013 08:37:31 -0800 (PST) Received-SPF: neutral (google.com: 92.243.29.197 is neither permitted nor denied by best guess record for domain of riku.voipio@linaro.org) client-ip=92.243.29.197; Authentication-Results: mx.google.com; spf=neutral (google.com: 92.243.29.197 is neither permitted nor denied by best guess record for domain of riku.voipio@linaro.org) smtp.mail=riku.voipio@linaro.org Received: from aimless.elisa-laajakaista.fi (a91-156-58-157.elisa-laajakaista.fi [91.156.58.157]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by afflict.kos.to (Postfix) with ESMTPSA id DB2B9264BB; Tue, 22 Jan 2013 17:37:27 +0100 (CET) From: Riku Voipio To: linux-media@vger.kernel.org Cc: Riku Voipio Subject: [PATCH] v4l-utils: use openat when available Date: Tue, 22 Jan 2013 18:37:22 +0200 Message-Id: <1358872642-30843-1-git-send-email-riku.voipio@linaro.org> X-Mailer: git-send-email 1.7.10.4 X-Gm-Message-State: ALoCoQnvCJGVkWs+1vOGw+EY5LcI5a7MB7pnURMUVihw4+RwTGP9zWO/KdtPp+WLcXvr/ib/rdi3 New architectures such as 64-Bit arm build kernels without legacy system calls - Such as the the no-at system calls. Thus, use SYS_openat whenever it is available. Signed-off-by: Riku Voipio --- lib/libv4lconvert/libv4lsyscall-priv.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/libv4lconvert/libv4lsyscall-priv.h b/lib/libv4lconvert/libv4lsyscall-priv.h index 2dac49a..cdd38bc 100644 --- a/lib/libv4lconvert/libv4lsyscall-priv.h +++ b/lib/libv4lconvert/libv4lsyscall-priv.h @@ -72,8 +72,13 @@ typedef off_t __off_t; #ifndef CONFIG_SYS_WRAPPER +#ifdef SYS_openat +#define SYS_OPEN(file, oflag, mode) \ + syscall(SYS_openat, AT_FDCWD, (const char *)(file), (int)(oflag), (mode_t)(mode)) +#else #define SYS_OPEN(file, oflag, mode) \ syscall(SYS_open, (const char *)(file), (int)(oflag), (mode_t)(mode)) +#endif #define SYS_CLOSE(fd) \ syscall(SYS_close, (int)(fd)) #define SYS_IOCTL(fd, cmd, arg) \