0001-fix-gcc-10.patch 985 B

123456789101112131415161718192021222324
  1. Fix build with gcc 10
  2. Add missing extern to gBm to fix the following build failure with
  3. -fno-common which is enabled by default with gcc 10:
  4. /usr/lfs/hdd_v1/rc-buildroot-test/scripts/instance-0/output-1/host/lib/gcc/arm-buildroot-linux-gnueabihf/10.2.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: bookmark.o:(.bss+0x10): multiple definition of `gBm'; gpshare.o:(.bss+0x24): first defined here
  5. Fixes:
  6. - http://autobuild.buildroot.org/results/78822bc0e0039e8f8949011a256cac022863276f
  7. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  8. diff -Nura ncftp-3.2.6-orig/sh_util/gpshare.c ncftp-3.2.6/sh_util/gpshare.c
  9. --- ncftp-3.2.6-orig/sh_util/gpshare.c 2020-08-21 10:46:34.173816750 +0200
  10. +++ ncftp-3.2.6/sh_util/gpshare.c 2020-08-21 10:52:25.407976319 +0200
  11. @@ -28,7 +28,7 @@
  12. static int gIsAtty1 = 1, gIsAtty2 = 1;
  13. extern int gLoadedBm, gBookmarkMatchMode;
  14. -Bookmark gBm;
  15. +extern Bookmark gBm;
  16. double
  17. FileSize(double size, const char **uStr0, double *uMult0)