From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-bk0-x22b.google.com (mail-bk0-x22b.google.com [IPv6:2a00:1450:4008:c01::22b]) by dpdk.org (Postfix) with ESMTP id 2B79D532D for ; Wed, 12 Jun 2013 16:29:56 +0200 (CEST) Received: by mail-bk0-f43.google.com with SMTP id jm2so3391356bkc.16 for ; Wed, 12 Jun 2013 07:30:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=+7wjpo44ZC8WzgwnUMbkPKFqNbbz893AR/SMH5CoKq0=; b=LJNprteMGTxnsHVbOLSyLS+lzw7JKwNcDJtbf4Js3XOo498THQhRkOarlgWCmifcjm o5QnOOzJhbQmBZK0GjrSvSZhftbUIqZSQQFJ7q5q1JgTd0Jrwj01Y7OHk93A0ioHrFEb wojRF8upy90i/DoaZ9sPoKpzI+XXNjz31+3akRd7Cn1kRrwWwRNEEbWfaihaxl8sa3X9 l3TFGpWMeNsmK5QmduzLidZayWfWSTf7FNdw2alYk/x7+LXklSi+2gMoKk8fH3hjBSAr ASgt/kggIlCp9/ScmpjlY5uH5wBfgwgZlrvPEzy2nlvYyyij1PyVQ87RN8mJKIUfatGI zPow== X-Received: by 10.204.57.203 with SMTP id d11mr3179367bkh.25.1371047405563; Wed, 12 Jun 2013 07:30:05 -0700 (PDT) Received: from 6wind.com (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id rj5sm7861627bkb.1.2013.06.12.07.30.02 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 12 Jun 2013 07:30:04 -0700 (PDT) Received: by 6wind.com (sSMTP sendmail emulation); Wed, 12 Jun 2013 16:30:05 +0200 From: Thomas Monjalon To: dev@dpdk.org Date: Wed, 12 Jun 2013 16:30:05 +0200 Message-Id: <1371047405-29432-1-git-send-email-thomas.monjalon@6wind.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <201306121539.49552.thomas.monjalon@6wind.com> References: <201306121539.49552.thomas.monjalon@6wind.com> X-Gm-Message-State: ALoCoQm/ZsixNzSYHch9VC9rmuq4r9qFqujYRp0hinWRrZQ+Pv9n7CAbg9lQVQ7QW3zkmEVp+FiL Subject: [dpdk-dev] [PATCH] ethdev: fix empty struct rte_eth_txmode X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jun 2013 14:29:56 -0000 The previous fix was for g++ but is broken with gcc: error: flexible array member in otherwise empty struct See http://gcc.gnu.org/onlinedocs/gcc-4.2.2/gcc/Zero-Length.html Let's fix it with #ifdef __cplusplus. Signed-off-by: Thomas Monjalon --- lib/librte_ether/rte_ethdev.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h index a253b3f..2280772 100644 --- a/lib/librte_ether/rte_ethdev.h +++ b/lib/librte_ether/rte_ethdev.h @@ -320,7 +320,9 @@ struct rte_eth_vmdq_dcb_conf { * For future extensions. */ struct rte_eth_txmode { +#ifdef __cplusplus int reserved[]; /* force size of struct to be 0 */ +#endif }; /** -- 1.7.10.4