1*4882a593Smuzhiyunfix build with gcc 10 2*4882a593Smuzhiyun 3*4882a593SmuzhiyunDefine curr_state as extern in nanocom.h to avoid the following build 4*4882a593Smuzhiyunfailure with gcc 10 (which defaults to -fno-common): 5*4882a593Smuzhiyun 6*4882a593Smuzhiyun/home/buildroot/autobuild/instance-3/output-1/host/lib/gcc/arm-buildroot-linux-gnueabihf/10.2.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: /tmp/ccLQeiek.o:(.bss+0x7c): multiple definition of `curr_state'; /tmp/ccse155z.o:(.bss+0x0): first defined here 7*4882a593Smuzhiyun 8*4882a593SmuzhiyunFixes: 9*4882a593Smuzhiyun - http://autobuild.buildroot.org/results/4af4710cb9bbb1bc770b9824339dd7dbf8a80b05 10*4882a593Smuzhiyun 11*4882a593SmuzhiyunSigned-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> 12*4882a593Smuzhiyun 13*4882a593Smuzhiyundiff -Naurp nanocom-1.0.orig/nanocom.c nanocom-1.0/nanocom.c 14*4882a593Smuzhiyun--- nanocom-1.0.orig/nanocom.c 2020-09-04 14:50:15.973320870 +0200 15*4882a593Smuzhiyun+++ nanocom-1.0/nanocom.c 2020-09-04 14:53:49.429325087 +0200 16*4882a593Smuzhiyun@@ -20,6 +20,8 @@ Based upon microcom by Anca and Lucian J 17*4882a593Smuzhiyun 18*4882a593Smuzhiyun #include "nanocom.h" 19*4882a593Smuzhiyun 20*4882a593Smuzhiyun+state curr_state; 21*4882a593Smuzhiyun+ 22*4882a593Smuzhiyun int crnl_mapping; //0 - no mapping, 1 mapping 23*4882a593Smuzhiyun 24*4882a593Smuzhiyun char device[MAX_DEVICE_NAME]; /* serial device name */ 25*4882a593Smuzhiyundiff -Naurp nanocom-1.0.orig/nanocom.h nanocom-1.0/nanocom.h 26*4882a593Smuzhiyun--- nanocom-1.0.orig/nanocom.h 2020-09-04 14:50:15.973320870 +0200 27*4882a593Smuzhiyun+++ nanocom-1.0/nanocom.h 2020-09-04 14:51:12.269321982 +0200 28*4882a593Smuzhiyun@@ -73,7 +73,7 @@ typedef struct { 29*4882a593Smuzhiyun char echo_type; /*r for remote, l for local and n for none*/ 30*4882a593Smuzhiyun } state; 31*4882a593Smuzhiyun 32*4882a593Smuzhiyun-state curr_state; 33*4882a593Smuzhiyun+extern state curr_state; 34*4882a593Smuzhiyun 35*4882a593Smuzhiyun #endif /* NANOCOM_H */ 36*4882a593Smuzhiyun 37