0001-lib-neardal.h-fix-build-with-gcc-10.patch 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  1. From 08467411d7dfc2a2b7ede62e5fdc640748ea1db2 Mon Sep 17 00:00:00 2001
  2. From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  3. Date: Wed, 9 Sep 2020 19:14:52 +0200
  4. Subject: [PATCH] lib/neardal.h: fix build with gcc 10
  5. Define neardal_output_cb as extern to avoid the following build failure
  6. with gcc 10 (which defaults to -fno-common):
  7. /srv/storage/autobuild/run/instance-2/output-1/host/lib/gcc/arm-buildroot-linux-gnueabihf/10.2.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: ./.libs/neardal_adapter.o:(.bss+0x0): multiple definition of `neardal_output_cb'; ./.libs/neardal.o:(.bss+0x68): first defined here
  8. Fixes:
  9. - http://autobuild.buildroot.org/results/7efb100c899b67ffd570f73c202442f95ca5397e
  10. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  11. [Upstream status: https://github.com/connectivity/neardal/pull/10]
  12. ---
  13. lib/neardal.h | 2 +-
  14. 1 file changed, 1 insertion(+), 1 deletion(-)
  15. diff --git a/lib/neardal.h b/lib/neardal.h
  16. index d1cd18b..3e83595 100644
  17. --- a/lib/neardal.h
  18. +++ b/lib/neardal.h
  19. @@ -638,7 +638,7 @@ neardal_record *neardal_g_variant_to_record(GVariant *in);
  20. void neardal_trace(const char *func, FILE *fp, char *fmt, ...)
  21. __attribute__((format(printf, 3, 4)));
  22. -int (*neardal_output_cb)(FILE *fp, const char *fmt, va_list ap);
  23. +extern int (*neardal_output_cb)(FILE *fp, const char *fmt, va_list ap);
  24. #ifdef __cplusplus
  25. }
  26. --
  27. 2.28.0