From patchwork Sun Sep 22 14:50:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 13809133 X-Patchwork-Delegate: stephen@networkplumber.org Received: from mail-ed1-f42.google.com (mail-ed1-f42.google.com [209.85.208.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 73ADDBA27 for ; Sun, 22 Sep 2024 14:50:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727016622; cv=none; b=jSt5NHA0S0ln0EEsvnJTwviwyu2YymGXiVwzJnNF9oVtjrSzvUbyGNipeIKE8Z9HJqi6lUZeAV36lP7pcXxnzSYGBi9AOUyvRnV2cGuymJnjWGANqbtNaZmYGiVPdlBqMOHMQ8EtAWgFrdSRAwGT9hIvw9NsUL8yu02BpDbKypc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727016622; c=relaxed/simple; bh=PaIB284EvgyZEnrtmdJgIB4a5QFh7/X4mK3A44TRcxw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=bfVUBDdvfwzKqWktLAAm8ErOGfdUqYk33hxQTHaO6HguLjHvCaTGe5nTQ/FD6kqUrNiKY6wdjTMmDlDzmbfEeRYxME6qouWG3VFsqW5W8vXYvAdKPntKXsBxICZHA+VIQsuzrXWTVf7RdR4VntRbo++8sQbipbboT8pCisSBrN8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com; spf=pass smtp.mailfrom=amarulasolutions.com; dkim=pass (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b=gU+UYAec; arc=none smtp.client-ip=209.85.208.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=amarulasolutions.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="gU+UYAec" Received: by mail-ed1-f42.google.com with SMTP id 4fb4d7f45d1cf-5c46680a71bso2552708a12.2 for ; Sun, 22 Sep 2024 07:50:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1727016619; x=1727621419; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=3d944BDKuY8b/yUPC5xNbCL96du/ssM/tVVGCvZ3aCI=; b=gU+UYAecB9OrIO8JV8OCh1QnyTp39WCgilTf3/bo66I8vL7nWy8df57XuM16X1kcrU 1SZliNXrW7BN4oQNyGoXgSMMW1pZ8qxb9IE1hUZBwQ6susihOwsGJ3sEWyKZzdvBwPsn Tqy/2I8fFkdBDyph/wVvv6fy638epfmsruVug= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727016619; x=1727621419; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=3d944BDKuY8b/yUPC5xNbCL96du/ssM/tVVGCvZ3aCI=; b=C8YjUVFV6fDzrOf2F3910vMaC9ltT4T6AcLRU/EIPYROzl0OGGDU0/TfPdbUIqiJvy WcBZxQ2Et2dIMId9aKdu/qw6N9tM2QHbPWKX47xs9J/DJh5N9Vj7zNI2voU37mMG+G9X nDHP2mQR/wDsWazlYl2ST6Vf3HslOayeTGAiavABTjuy1jgDys7P0RkjKj/nox0i+11N RrCOo0r7iSA3yYXlju9FO9GaNgT0RmPHRqTntLFyf8UfQX1BStlmI9k45oUhzCh7/9Be 9bz1NO9qwQf0cgIUBVIEvi3x7AZRvUbsior4wJJ5d5EUayWMAwQ5xSiWa0nrONxex2ml sRBw== X-Gm-Message-State: AOJu0Yy3TcWWZCHzTF4kDoe0CY6LsaVHs7VoT9equlpWNjT6N4uRIJyA tB3Bo96R8zzAg0WT/QeB5MnkEJdvRsM/qfLeA5IbXC2HlLOwErnOyLBJlvtfIQLz7rVkKaBNpp0 P5sw= X-Google-Smtp-Source: AGHT+IHJ3OLVqiy4DgE4NnaGFI8/GsV40iaossYganaEo5dpLYOvFNm4B3Ul/d0qZU4/SLWC+gQvYA== X-Received: by 2002:a05:6402:13d1:b0:5c5:bebb:5408 with SMTP id 4fb4d7f45d1cf-5c5bebb5afdmr1535849a12.6.1727016618419; Sun, 22 Sep 2024 07:50:18 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-79-20-102-52.retail.telecomitalia.it. [79.20.102.52]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5c42bc8907asm9724838a12.85.2024.09.22.07.50.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Sep 2024 07:50:17 -0700 (PDT) From: Dario Binacchi To: netdev@vger.kernel.org Cc: Stephen Hemminger , linux-amarula@amarulasolutions.com, Dario Binacchi Subject: [iproute2, PATCH 1/2] bridge: mst: fix a musl build issue Date: Sun, 22 Sep 2024 16:50:10 +0200 Message-ID: <20240922145011.2104040-1-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: dsahern@gmail.com This patch fixes a compilation error raised by the bump to version 6.11.0 in Buildroot using musl as the C library for the cross-compilation toolchain. After setting the CFLGAS ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y) IPROUTE2_CFLAGS += -D__UAPI_DEF_IN6_ADDR=0 -D__UAPI_DEF_SOCKADDR_IN6=0 \ -D__UAPI_DEF_IPV6_MREQ=0 endif to fix the following errors: In file included from ../../../host/mips64-buildroot-linux-musl/sysroot/usr/include/arpa/inet.h:9, from ../include/libnetlink.h:14, from mst.c:10: ../../../host/mips64-buildroot-linux-musl/sysroot/usr/include/netinet/in.h:23:8: error: redefinition of 'struct in6_addr' 23 | struct in6_addr { | ^~~~~~~~ In file included from ../include/uapi/linux/if_bridge.h:19, from mst.c:7: ../include/uapi/linux/in6.h:33:8: note: originally defined here 33 | struct in6_addr { | ^~~~~~~~ ../../../host/mips64-buildroot-linux-musl/sysroot/usr/include/netinet/in.h:34:8: error: redefinition of 'struct sockaddr_in6' 34 | struct sockaddr_in6 { | ^~~~~~~~~~~~ ../include/uapi/linux/in6.h:50:8: note: originally defined here 50 | struct sockaddr_in6 { | ^~~~~~~~~~~~ ../../../host/mips64-buildroot-linux-musl/sysroot/usr/include/netinet/in.h:42:8: error: redefinition of 'struct ipv6_mreq' 42 | struct ipv6_mreq { | ^~~~~~~~~ ../include/uapi/linux/in6.h:60:8: note: originally defined here 60 | struct ipv6_mreq { I got this further errors ../include/uapi/linux/in6.h:72:25: error: field 'flr_dst' has incomplete type 72 | struct in6_addr flr_dst; | ^~~~~~~ ../include/uapi/linux/if_bridge.h:711:41: error: field 'ip6' has incomplete type 711 | struct in6_addr ip6; | ^~~ fixed by including the netinet/in.h header. Signed-off-by: Dario Binacchi --- bridge/mst.c | 1 + 1 file changed, 1 insertion(+) diff --git a/bridge/mst.c b/bridge/mst.c index 873ca5369fd6..c8f7e6606c3c 100644 --- a/bridge/mst.c +++ b/bridge/mst.c @@ -4,6 +4,7 @@ */ #include +#include #include #include From patchwork Sun Sep 22 14:50:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 13809134 X-Patchwork-Delegate: stephen@networkplumber.org Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com [209.85.208.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1F6DDC153 for ; Sun, 22 Sep 2024 14:50:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727016624; cv=none; b=Wh1DAmscmiZrgbY8e7D/lhcF1d/jDnuTngdR8U0nhmqX4rovZ3/n0+VRdmB8G/WNMppZJwFJO7dArYDWgQuYlJHOZAB3TFbwM253ZljR9BRbY8/6PS5YJN9X6exsftOHN7VoD9MqM9fMAJEx05kGG26dR3A+7l8SJ1Vi6QVWr1g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727016624; c=relaxed/simple; bh=rfP49NcdbwsNzXUNp5f7ISbizkdes0QZurAgqujz4Ro=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hda/Uf1C8WkYXwY40sRPi4BHWBJoJmjwjcSXbSlxjeo4yq1FTzHZLa3geLPKmJD3pnRwPihZhfibJrqMNFlgfAUc/TktITJvtsJn7hM6lLgPGZcZj1Ch0vPSEcqZfb1zqjG7jZ5b+MrzDDh8lF+sfzpqZSGeP4/LEbFrr5eYfYQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com; spf=pass smtp.mailfrom=amarulasolutions.com; dkim=pass (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b=ge+6er3b; arc=none smtp.client-ip=209.85.208.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=amarulasolutions.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="ge+6er3b" Received: by mail-ed1-f53.google.com with SMTP id 4fb4d7f45d1cf-5c245c62362so4363155a12.0 for ; Sun, 22 Sep 2024 07:50:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1727016621; x=1727621421; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VyVWc66giTUBEyVXjUY3pvJmuDFaMPkAt+mawlB1FXM=; b=ge+6er3bXEI4ZTFnF+NRgqeIpmx/DyJA/x9rpWVC+dMgu1LY5XNgYgOdXKrQra4F7t TMHIok/QgGfukAIaMBoIWPz3KocWYiG+pdKTy5DebnsElQc549PQjpqxQEB3U5iX2pNZ mM3HauOc8odaoBnz8+Dv1QGb8bS18FCzxvJE0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727016621; x=1727621421; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VyVWc66giTUBEyVXjUY3pvJmuDFaMPkAt+mawlB1FXM=; b=i0pySa8c//yAwSRrawtqIvrJ+fTCCyrFnUodljb/qjbslC+S6kUqTYSmDSXJ8QXdDh kZN3pfmIevsoMijLpRr0sMcz7hO5wvmU+dHXuA1zbJkyepbDDnNy2th/YCY+ulD0jsTC I2KHyKuqaS/oJNYQHNGevjAli/yhRuz95oI7vUdUBK+9NGMn4DJXhG60l4W5Ya8PRh/g /UBOWFN4Ee1OXsr0gnM+z1cG+r0LZnDOWe5B5I5VAyKF3GLw3PY/3P1l97vJ+efjcqJl rbiQ22j/tNk3igwWFnVLH2MRh9BEPvWLWk2N9yVg0iaNmvRTwXV/aP9ddGmhV4XRhQXj dVYw== X-Gm-Message-State: AOJu0YxVhAkyKX0j853ZKSgpUEPecfn8UwpQi+CLwdjATBHCZDSsh21d b7FeIVH1tbTuxYbocX2tWjyA7vTcKfistCp7HhGKn5FrTe410oWEquhHE0enIND1gyq4H6iRhlw JI4M= X-Google-Smtp-Source: AGHT+IH6wZ2kWh88EkVDKUU3Pr1sgIiLgXuT9kPyugC/ite5w1ds8/R0pet+TxhAt+ofuWHmbzirOA== X-Received: by 2002:a05:6402:40d3:b0:5c5:bad0:df3f with SMTP id 4fb4d7f45d1cf-5c5bad0dfdfmr2721261a12.22.1727016620977; Sun, 22 Sep 2024 07:50:20 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-79-20-102-52.retail.telecomitalia.it. [79.20.102.52]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5c42bc8907asm9724838a12.85.2024.09.22.07.50.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Sep 2024 07:50:19 -0700 (PDT) From: Dario Binacchi To: netdev@vger.kernel.org Cc: Stephen Hemminger , linux-amarula@amarulasolutions.com, Dario Binacchi Subject: [iproute2, PATCH 2/2] bridge: mst: fix a further musl build issue Date: Sun, 22 Sep 2024 16:50:11 +0200 Message-ID: <20240922145011.2104040-2-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240922145011.2104040-1-dario.binacchi@amarulasolutions.com> References: <20240922145011.2104040-1-dario.binacchi@amarulasolutions.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: dsahern@gmail.com This patch fixes the following build errors: In file included from mst.c:11: ../include/json_print.h:80:30: warning: 'struct timeval' declared inside parameter list will not be visible outside of this definition or declaration 80 | _PRINT_FUNC(tv, const struct timeval *) | ^~~~~~~ ../include/json_print.h:50:37: note: in definition of macro '_PRINT_FUNC' 50 | type value); \ | ^~~~ ../include/json_print.h:80:30: warning: 'struct timeval' declared inside parameter list will not be visible outside of this definition or declaration 80 | _PRINT_FUNC(tv, const struct timeval *) | ^~~~~~~ ../include/json_print.h:55:45: note: in definition of macro '_PRINT_FUNC' 55 | type value) \ | ^~~~ ../include/json_print.h: In function 'print_tv': ../include/json_print.h:58:48: error: passing argument 5 of 'print_color_tv' from incompatible pointer type [-Wincompatible-pointer-types] 58 | value); \ | ^~~~~ | | | const struct timeval * ../include/json_print.h:80:1: note: in expansion of macro '_PRINT_FUNC' 80 | _PRINT_FUNC(tv, const struct timeval *) | ^~~~~~~~~~~ ../include/json_print.h:50:42: note: expected 'const struct timeval *' but argument is of type 'const struct timeval *' 50 | type value); \ | ^ ../include/json_print.h:80:1: note: in expansion of macro '_PRINT_FUNC' 80 | _PRINT_FUNC(tv, const struct timeval *) Signed-off-by: Dario Binacchi --- bridge/mst.c | 1 + 1 file changed, 1 insertion(+) diff --git a/bridge/mst.c b/bridge/mst.c index c8f7e6606c3c..fccb7fd68140 100644 --- a/bridge/mst.c +++ b/bridge/mst.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include