0002-plc-plc.h-fix-build-with-gcc-10.patch 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. From 27222be0b8db59cae30a5fcca93255daea147bb6 Mon Sep 17 00:00:00 2001
  2. From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  3. Date: Wed, 23 Sep 2020 19:05:23 +0200
  4. Subject: [PATCH] plc/plc.h: fix build with gcc 10
  5. Drop plcproperty from plc/plc.h to avoid the following build failure
  6. with gcc 10 (which defaults to -fno-common):
  7. /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
  8. Fixes:
  9. - http://autobuild.buildroot.org/results/6b3064b64dea3d4aaf219f787429c25918101483
  10. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  11. [Upstream status: https://github.com/qca/open-plc-utils/pull/141]
  12. ---
  13. plc/plc.h | 4 +---
  14. 1 file changed, 1 insertion(+), 3 deletions(-)
  15. diff --git a/plc/plc.h b/plc/plc.h
  16. index 1fa32b53..208cf91a 100644
  17. --- a/plc/plc.h
  18. +++ b/plc/plc.h
  19. @@ -496,9 +496,7 @@ struct __packed plcproperty
  20. uint8_t DATA_FORMAT;
  21. uint32_t DATA_LENGTH;
  22. uint8_t DATA_BUFFER [128];
  23. -}
  24. -
  25. -plcproperty;
  26. +};
  27. #ifndef __GNUC__
  28. #pragma pack (pop)
  29. --
  30. 2.28.0