xref: /OK3568_Linux_fs/buildroot/package/open-plc-utils/0002-plc-plc.h-fix-build-with-gcc-10.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunFrom 27222be0b8db59cae30a5fcca93255daea147bb6 Mon Sep 17 00:00:00 2001
2*4882a593SmuzhiyunFrom: Fabrice Fontaine <fontaine.fabrice@gmail.com>
3*4882a593SmuzhiyunDate: Wed, 23 Sep 2020 19:05:23 +0200
4*4882a593SmuzhiyunSubject: [PATCH] plc/plc.h: fix build with gcc 10
5*4882a593Smuzhiyun
6*4882a593SmuzhiyunDrop plcproperty from plc/plc.h to avoid the following build failure
7*4882a593Smuzhiyunwith gcc 10 (which defaults to -fno-common):
8*4882a593Smuzhiyun
9*4882a593Smuzhiyun/home/buildroot/autobuild/run/instance-3/output-1/host/lib/gcc/arm-buildroot-linux-gnueabihf/10.2.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: rules.o:(.bss+0x0): multiple definition of `plcproperty'; pibruin.o:(.bss+0x0): first defined here
10*4882a593Smuzhiyun
11*4882a593SmuzhiyunFixes:
12*4882a593Smuzhiyun - http://autobuild.buildroot.org/results/6b3064b64dea3d4aaf219f787429c25918101483
13*4882a593Smuzhiyun
14*4882a593SmuzhiyunSigned-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
15*4882a593Smuzhiyun[Upstream status: https://github.com/qca/open-plc-utils/pull/141]
16*4882a593Smuzhiyun---
17*4882a593Smuzhiyun plc/plc.h | 4 +---
18*4882a593Smuzhiyun 1 file changed, 1 insertion(+), 3 deletions(-)
19*4882a593Smuzhiyun
20*4882a593Smuzhiyundiff --git a/plc/plc.h b/plc/plc.h
21*4882a593Smuzhiyunindex 1fa32b53..208cf91a 100644
22*4882a593Smuzhiyun--- a/plc/plc.h
23*4882a593Smuzhiyun+++ b/plc/plc.h
24*4882a593Smuzhiyun@@ -496,9 +496,7 @@ struct __packed plcproperty
25*4882a593Smuzhiyun 	uint8_t DATA_FORMAT;
26*4882a593Smuzhiyun 	uint32_t DATA_LENGTH;
27*4882a593Smuzhiyun 	uint8_t DATA_BUFFER [128];
28*4882a593Smuzhiyun-}
29*4882a593Smuzhiyun-
30*4882a593Smuzhiyun-plcproperty;
31*4882a593Smuzhiyun+};
32*4882a593Smuzhiyun
33*4882a593Smuzhiyun #ifndef __GNUC__
34*4882a593Smuzhiyun #pragma pack (pop)
35*4882a593Smuzhiyun--
36*4882a593Smuzhiyun2.28.0
37*4882a593Smuzhiyun
38