From patchwork Sun Sep 3 16:34:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kamil Rytarowski X-Patchwork-Id: 9936439 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8E344601D7 for ; Sun, 3 Sep 2017 16:48:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 71AC028657 for ; Sun, 3 Sep 2017 16:48:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 535D4286B3; Sun, 3 Sep 2017 16:48:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=2.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI,RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E4D2628657 for ; Sun, 3 Sep 2017 16:48:49 +0000 (UTC) Received: from localhost ([::1]:59815 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1doY42-0002X4-FE for patchwork-qemu-devel@patchwork.kernel.org; Sun, 03 Sep 2017 12:48:02 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43273) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1doY3H-0002WQ-GI for qemu-devel@nongnu.org; Sun, 03 Sep 2017 12:47:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1doY3C-00024V-Sj for qemu-devel@nongnu.org; Sun, 03 Sep 2017 12:47:15 -0400 Received: from mout.gmx.net ([212.227.17.20]:61276) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1doY3C-00023x-Jc for qemu-devel@nongnu.org; Sun, 03 Sep 2017 12:47:10 -0400 Received: from localhost.localdomain ([185.58.161.191]) by mail.gmx.com (mrgmx102 [212.227.17.174]) with ESMTPSA (Nemesis) id 0Lv8hi-1dOs1w3oDC-010LkM; Sun, 03 Sep 2017 18:46:59 +0200 From: Kamil Rytarowski To: kraxel@redhat.com Date: Sun, 3 Sep 2017 18:34:55 +0200 Message-Id: <20170903163455.15132-1-n54@gmx.com> X-Mailer: git-send-email 2.14.1 X-Provags-ID: V03:K0:0mtjTQmeXa6ZOSrGFbdka4jTCQqQ69iC+UIO1tCCvQpTE23qU3n r2UTmKJza3dAK+IGyw11YnNQ/4XlkVG4kyjbBX+/BAFvO79d82SCF7dWQ9Voq0S81+FgjOK TQloR3dPNPt3vHCWMVfcgbUTjj8CxhMW8FxqNphz66ZDzoHgOXrfoMiQDHRakdzdjTRLzuc xVra39Lj4D5INXgV88yWw== X-UI-Out-Filterresults: notjunk:1; V01:K0:B62xLdT7Inw=:vgY+/5NKXM2ymsgJgMmHuL Ous0wN+TNkYW061oQPrGoH3bCZFIh5Ut3Y8FIJwp8aK0NhqWbbNxxEnZMUu+faAvO13wfOEBU aPAojHm1dvh4tEhaY4s/MRAYTz3aZJG5RBMUb59V4HoSvt76fvDWaDoz/85MULO2Jat7qjB3l V4iDo/HQ2gJGWOPWcvOkstrsyGFokTF3ZnFfKnq+G6Ba0cJYhVpAyLJ8awtTs31z4bnZu5dRu cNFyVVMHTw9aMtKF8vgzt/nXKViUn5BISpLBP7DTQ31B8n/XwuPE1Y8YcNftsRUT/5avddsw0 ecWgHLQHB5+nPMGWsBk5JS5WBeuAO8HhFriAerQKlzmKY3AX+YIBK33v8wgAmCA5af8v/pE0T jY+ypJO/3um0egA+26LZfRvsw6OYMJYRURg3o+F6561oJ5tvADUns7XERTIAcusz+JifmCDUD T1MG3+AMLmnZeDuQ2sTnQgl2kA4hNNiDxiKwH6jkKk4U1gtTm6TINa5Ufd+d74vaFY2SWMBI5 urK75KXBo+KMpKdgkc8azdegdfo+6/HGRP4hxBR4X56Bw3+nHUxjBpRtewVo5omT3JrKd/VFY /Icdm7QBnXrIZj2HtFGyCNbEpq6802hwSqIp07cuxmrI2GocWrEozcy7QkKFgBMfPZj4kRW1W 31msRoGWBdxtIMIt2fnG20ka7nO8IXKPsqr9nZ385U8+alMtrX5mnk1GyELmwMVxR1ciXQi7e lgc7ZTTTElhDIXCq0B1yxo23v9K8mkMq1VjxzMZNk371RVFAcIu3oydIitXud2Dcw4Awd74vN 7LA8AzC+OTP7x6Kzj0tLXopTSmFug== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.17.20 Subject: [Qemu-devel] [PATCH] usb-mtp: Add fallback definition of NAME_MAX X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kamil Rytarowski , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP This fixes build on SmartOS (Joyent). Patch cherry-picked from pkgsrc by jperkin (Joyent). Signed-off-by: Kamil Rytarowski Reviewed-by: Philippe Mathieu-Daudé --- hw/usb/dev-mtp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c index 94c2e94f10..6e8d7b21b5 100644 --- a/hw/usb/dev-mtp.c +++ b/hw/usb/dev-mtp.c @@ -26,6 +26,10 @@ #include "hw/usb.h" #include "hw/usb/desc.h" +#ifndef NAME_MAX +#define NAME_MAX 255 +#endif + /* ----------------------------------------------------------------------- */ enum mtp_container_type {