From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f50.google.com (mail-wm0-f50.google.com [74.125.82.50]) by dpdk.org (Postfix) with ESMTP id 700B82142 for ; Fri, 10 Jun 2016 17:09:39 +0200 (CEST) Received: by mail-wm0-f50.google.com with SMTP id n184so270844215wmn.1 for ; Fri, 10 Jun 2016 08:09:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=L/PI6lrMNwjk+Wm5HiFjIk2c8736dsVkde5Btsg+/Bc=; b=TZczBQPEJRlmmRDUUea9T+PVa5MXSlvnVWjrwG+TVjihWsKilOMC6DHlDXueouAi9y yCjPWiewte1n53cjDKbGADyfDbj26LFRa332BBHWpdhmHq+ezM6gbtmh0dRKGEHR7Eqe LI6VGmWkktjUcvJyVeVx535LjWv+VSg1trntIgb2MSD17Hm/SjLjJF2NeCRqz6GrLRRt jEbNY/6SlnPHG+SiJ/DoloI4TW7ffBMqZacuH9tnLJXGR1LpxSqNNJmqDS3WCxVbUc7k NHQC6RHtHbR7RIe/6t9iUk38vxewfFFJ+dqedRf2AWoMRlela5Vs3Kn/qBSYl3jdiKmq NdtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=L/PI6lrMNwjk+Wm5HiFjIk2c8736dsVkde5Btsg+/Bc=; b=iGORlDUVEexhEFLgI7vqWKV3sqFXEiEgBw0cUPsSXHfWD5tZ8mX34eUD6ispurnErU fWZCKilK8CXoZqvuJ7uQyVhtvMJyqmVvhZDUE7PvkuZRqI8qOlRKLpuVXzWyGjQoXlA4 m1mQTIn/VA4IqGBdUTrg5JGQsERLkiGDfaD1ETHy0dpKWByQE0LCpoLD5Hj48mP4IheZ tk1FM3mxOPd0hv63P1prJEPqW7GTVveNKDeVIi8Vs73lyvPo6NEbH7jUlR9bHm8eVvPK KgIXAENSEUP/cSXchYbV8h8Z+pc8JDsLRz/LQr1FcgRBriL8URVDFXQVm72m3jS7OiVj 83dw== X-Gm-Message-State: ALyK8tKQNROQj/r+161hZpwYMDBFRLPY9zpNL1FcxT36oVhcl4ifto32mArwvKzZ8xyHpeHT X-Received: by 10.28.92.66 with SMTP id q63mr15491970wmb.73.1465571379137; Fri, 10 Jun 2016 08:09:39 -0700 (PDT) Received: from 6wind.com (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by smtp.gmail.com with ESMTPSA id zb2sm7978585wjb.46.2016.06.10.08.09.37 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 10 Jun 2016 08:09:38 -0700 (PDT) From: Adrien Mazarguil To: dev@dpdk.org Cc: Bruce Richardson Date: Fri, 10 Jun 2016 17:09:31 +0200 Message-Id: <1465571372-28254-1-git-send-email-adrien.mazarguil@6wind.com> X-Mailer: git-send-email 2.1.4 Subject: [dpdk-dev] [PATCH 1/2] mlx: fix compilation with recent Glibc 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: Fri, 10 Jun 2016 15:09:39 -0000 Various BSD ioctl macros are not exposed anymore when _XOPEN_SOURCE is defined, and linux/if.h now conflicts with net/if.h. Suggested-by: Bruce Richardson Signed-off-by: Adrien Mazarguil --- drivers/net/mlx4/Makefile | 1 + drivers/net/mlx4/mlx4.c | 7 +++---- drivers/net/mlx5/Makefile | 1 + drivers/net/mlx5/mlx5.h | 1 - drivers/net/mlx5/mlx5_ethdev.c | 7 +++---- drivers/net/mlx5/mlx5_mac.c | 1 - 6 files changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/net/mlx4/Makefile b/drivers/net/mlx4/Makefile index d2f5692..6ec33a6 100644 --- a/drivers/net/mlx4/Makefile +++ b/drivers/net/mlx4/Makefile @@ -48,6 +48,7 @@ CFLAGS += -O3 CFLAGS += -std=gnu99 -Wall -Wextra CFLAGS += -g CFLAGS += -I. +CFLAGS += -D_DEFAULT_SOURCE CFLAGS += -D_XOPEN_SOURCE=600 CFLAGS += $(WERROR_FLAGS) LDLIBS += -libverbs diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c index 9ed1491..5000eb1 100644 --- a/drivers/net/mlx4/mlx4.c +++ b/drivers/net/mlx4/mlx4.c @@ -54,7 +54,6 @@ #include #include #include -#include #include #include #include @@ -4771,7 +4770,7 @@ mlx4_link_update_unlocked(struct rte_eth_dev *dev, int wait_to_complete) memset(&dev_link, 0, sizeof(dev_link)); dev_link.link_status = ((ifr.ifr_flags & IFF_UP) && (ifr.ifr_flags & IFF_RUNNING)); - ifr.ifr_data = &edata; + ifr.ifr_data = (void *)&edata; if (priv_ifreq(priv, SIOCETHTOOL, &ifr)) { WARN("ioctl(SIOCETHTOOL, ETHTOOL_GSET) failed: %s", strerror(errno)); @@ -4930,7 +4929,7 @@ mlx4_dev_get_flow_ctrl(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf) if (mlx4_is_secondary()) return -E_RTE_SECONDARY; - ifr.ifr_data = ðpause; + ifr.ifr_data = (void *)ðpause; priv_lock(priv); if (priv_ifreq(priv, SIOCETHTOOL, &ifr)) { ret = errno; @@ -4980,7 +4979,7 @@ mlx4_dev_set_flow_ctrl(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf) if (mlx4_is_secondary()) return -E_RTE_SECONDARY; - ifr.ifr_data = ðpause; + ifr.ifr_data = (void *)ðpause; ethpause.autoneg = fc_conf->autoneg; if (((fc_conf->mode & RTE_FC_FULL) == RTE_FC_FULL) || (fc_conf->mode & RTE_FC_RX_PAUSE)) diff --git a/drivers/net/mlx5/Makefile b/drivers/net/mlx5/Makefile index 92bfa07..a25649b 100644 --- a/drivers/net/mlx5/Makefile +++ b/drivers/net/mlx5/Makefile @@ -59,6 +59,7 @@ CFLAGS += -O3 CFLAGS += -std=gnu99 -Wall -Wextra CFLAGS += -g CFLAGS += -I. +CFLAGS += -D_DEFAULT_SOURCE CFLAGS += -D_XOPEN_SOURCE=600 CFLAGS += $(WERROR_FLAGS) CFLAGS += -Wno-strict-prototypes diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h index 2487662..fb4f95a 100644 --- a/drivers/net/mlx5/mlx5.h +++ b/drivers/net/mlx5/mlx5.h @@ -39,7 +39,6 @@ #include #include #include -#include /* Verbs header. */ /* ISO C doesn't support unnamed structs/unions, disabling -pedantic. */ diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c index 36b369e..9a8d1d9 100644 --- a/drivers/net/mlx5/mlx5_ethdev.c +++ b/drivers/net/mlx5/mlx5_ethdev.c @@ -44,7 +44,6 @@ #include #include #include -#include #include #include #include @@ -617,7 +616,7 @@ mlx5_link_update_unlocked(struct rte_eth_dev *dev, int wait_to_complete) memset(&dev_link, 0, sizeof(dev_link)); dev_link.link_status = ((ifr.ifr_flags & IFF_UP) && (ifr.ifr_flags & IFF_RUNNING)); - ifr.ifr_data = &edata; + ifr.ifr_data = (void *)&edata; if (priv_ifreq(priv, SIOCETHTOOL, &ifr)) { WARN("ioctl(SIOCETHTOOL, ETHTOOL_GSET) failed: %s", strerror(errno)); @@ -767,7 +766,7 @@ mlx5_dev_get_flow_ctrl(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf) if (mlx5_is_secondary()) return -E_RTE_SECONDARY; - ifr.ifr_data = ðpause; + ifr.ifr_data = (void *)ðpause; priv_lock(priv); if (priv_ifreq(priv, SIOCETHTOOL, &ifr)) { ret = errno; @@ -818,7 +817,7 @@ mlx5_dev_set_flow_ctrl(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf) if (mlx5_is_secondary()) return -E_RTE_SECONDARY; - ifr.ifr_data = ðpause; + ifr.ifr_data = (void *)ðpause; ethpause.autoneg = fc_conf->autoneg; if (((fc_conf->mode & RTE_FC_FULL) == RTE_FC_FULL) || (fc_conf->mode & RTE_FC_RX_PAUSE)) diff --git a/drivers/net/mlx5/mlx5_mac.c b/drivers/net/mlx5/mlx5_mac.c index c9cea48..f6b27bb 100644 --- a/drivers/net/mlx5/mlx5_mac.c +++ b/drivers/net/mlx5/mlx5_mac.c @@ -38,7 +38,6 @@ #include #include #include -#include #include #include -- 2.1.4