From patchwork Mon Jun 26 19:20:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 780864 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wxLS95C8Mz9s81 for ; Tue, 27 Jun 2017 06:36:25 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="Al3U/vKv"; dkim-atps=neutral Received: from localhost ([::1]:48434 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dPakB-00069z-9v for incoming@patchwork.ozlabs.org; Mon, 26 Jun 2017 16:36:23 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39946) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dPZZ9-0002ku-0o for qemu-devel@nongnu.org; Mon, 26 Jun 2017 15:20:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dPZZ4-0007mn-H7 for qemu-devel@nongnu.org; Mon, 26 Jun 2017 15:20:54 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:56237) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dPZZ4-0007lF-1q for qemu-devel@nongnu.org; Mon, 26 Jun 2017 15:20:50 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id EC09120DF6; Mon, 26 Jun 2017 15:20:47 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Mon, 26 Jun 2017 15:20:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:message-id:subject:to :x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s=fm1; bh=PqPHwH jIMFds8oHXTZ7ZrhcWUA4x0Vv4R6k06KAkBqI=; b=Al3U/vKv2n+ETjgkEININT yNeCwzF1oc9Urr608DXfp6iveNAMuDdxVoBQE5hsytWyLcIT4D1IdwQcsDfhEeDi 0hKLO94jFaDZZPSsWPVTjK+79Ljh8OvglkxJiOW02cOK3gdxoyHk0tLABbYTDbFX Q667uFjdoHWUbSJiGcAxeMZ8tcebM+TWRNsKIx95pAMwm5e7eMW2yuwW4N2MMKWj /gxLGKdN5/Idl1s62l+egXZgofxxWcW9SiIaNhUQANKBVyok4OvAApYMH9nBmBe8 2o2YxJfSeJ+mKWh3TEGYXAS5Ve7ff1ps5meagVmawPTiL8v2rQNdIwpmH6Lf9F4g == X-ME-Sender: X-Sasl-enc: egzTLjuWaMQGi9vaCUwAHnG469J5HXjnIoTJ3wjvFloV 1498504847 Received: from localhost (x4e340068.dyn.telefonica.de [78.52.0.104]) by mail.messagingengine.com (Postfix) with ESMTPA id 86B1E7E7FD; Mon, 26 Jun 2017 15:20:47 -0400 (EDT) From: Patrick Steinhardt To: qemu-devel@nongnu.org Date: Mon, 26 Jun 2017 21:20:45 +0200 Message-Id: <07010a2ad79559c412949f0005dbe3cb03d8416e.1498504812.git.ps@pks.im> X-Mailer: git-send-email 2.13.2 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.111.4.27 X-Mailman-Approved-At: Mon, 26 Jun 2017 16:35:43 -0400 Subject: [Qemu-devel] [PATCH] 9pfs: include for XATTR_SIZE_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: Patrick Steinhardt Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" The function `v9fs_xattrcreate` makes use of the define `XATTR_SIZE_MAX` to reject attempts of creating xattrs with an invalid size, which is defined in . On glibc-based systems, this header is indirectly included via , , , but on other platforms this is not guaranteed due to not being part of the POSIX standard. One examples are systems based on musl libc, which do not include the indirectly, which leads to `XATTR_SIZE_MAX` being undefined. Fix this error by directly include . As the 9P fs code is being Linux-based either way, we can simply do so without breaking other platforms. This enables building 9pfs on musl-based systems. Signed-off-by: Patrick Steinhardt Reviewed-by: Alistair Francis --- hw/9pfs/9p.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c index 96d2683348..48cd558e96 100644 --- a/hw/9pfs/9p.c +++ b/hw/9pfs/9p.c @@ -13,6 +13,7 @@ #include "qemu/osdep.h" #include +#include #include "hw/virtio/virtio.h" #include "qapi/error.h" #include "qemu/error-report.h"