Package: scantool Version: 2.1-2 Followup-For: Bug #957781 User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu hirsute ubuntu-patch X-Debbugs-Cc: lo...@ubuntu.com Control: tags -1 patch
Hi, In Ubuntu, the attached patch was applied to achieve the following: * d/p/gcc-10.patch: Fix compilation with GCC 10. Thanks for considering the patch. Logan
diff -Nru scantool-2.1/debian/patches/gcc-10.patch scantool-2.1/debian/patches/gcc-10.patch --- scantool-2.1/debian/patches/gcc-10.patch 1969-12-31 19:00:00.000000000 -0500 +++ scantool-2.1/debian/patches/gcc-10.patch 2021-01-09 21:44:33.000000000 -0500 @@ -0,0 +1,121 @@ +--- a/globals.h ++++ b/globals.h +@@ -37,19 +37,19 @@ + #define C_LIGHT_GRAY 55 + + // +-int is_not_genuine_scan_tool; ++extern int is_not_genuine_scan_tool; + + // Options +-int system_of_measurements; +-int display_mode; ++extern int system_of_measurements; ++extern int display_mode; + + // File names +-char *options_file_name; +-char *data_file_name; +-char *code_defs_file_name; +-char log_file_name[20]; ++extern char *options_file_name; ++extern char *data_file_name; ++extern char *code_defs_file_name; ++extern char log_file_name[20]; + #ifdef LOG_COMMS +-char comm_log_file_name[20]; ++extern char comm_log_file_name[20]; + #endif + + void write_log(const char *log_string); +@@ -58,6 +58,6 @@ + void write_comm_log(const char *marker, const char *data); + #endif + +-DATAFILE *datafile; ++extern DATAFILE *datafile; + + #endif +--- a/main.c ++++ b/main.c +@@ -16,6 +16,23 @@ + + #define WINDOW_TITLE "ScanTool.net " SCANTOOL_VERSION_EX_STR + ++int is_not_genuine_scan_tool; ++ ++// Options ++int system_of_measurements; ++int display_mode; ++ ++// File names ++char *options_file_name; ++char *data_file_name; ++char *code_defs_file_name; ++char log_file_name[20]; ++#ifdef LOG_COMMS ++char comm_log_file_name[20]; ++#endif ++ ++DATAFILE *datafile; ++ + + void write_log(const char *log_string) + { +--- a/serial.h ++++ b/serial.h +@@ -77,13 +77,15 @@ + int display_error_message(int error, int retry); + + // variables +-volatile int serial_time_out; +-volatile int serial_timer_running; ++extern volatile int serial_time_out; ++extern volatile int serial_timer_running; + + struct COMPORT { + int number; + int baud_rate; + int status; // READY, NOT_OPEN, USER_IGNORED +-} comport; ++}; ++ ++extern struct COMPORT comport; + + #endif +--- a/serial.c ++++ b/serial.c +@@ -24,6 +24,11 @@ + #define TX_TIMEOUT_MULTIPLIER 0 + #define TX_TIMEOUT_CONSTANT 1000 + ++volatile int serial_time_out; ++volatile int serial_timer_running; ++ ++struct COMPORT comport; ++ + + + //timer interrupt handler for sensor data +--- a/error_handlers.h ++++ b/error_handlers.h +@@ -1,7 +1,7 @@ + #ifndef ERROR_HANDLERS_H + #define ERROR_HANDLERS_H + +-char temp_error_buf[256]; ++extern char temp_error_buf[256]; + + void fatal_error(char *msg); + +--- a/error_handlers.c ++++ b/error_handlers.c +@@ -3,6 +3,8 @@ + #include "error_handlers.h" + + ++char temp_error_buf[256]; ++ + void fatal_error(char *msg) + { + if (datafile != NULL) diff -Nru scantool-2.1/debian/patches/series scantool-2.1/debian/patches/series --- scantool-2.1/debian/patches/series 1969-12-31 19:00:00.000000000 -0500 +++ scantool-2.1/debian/patches/series 2021-01-09 21:33:51.000000000 -0500 @@ -0,0 +1 @@ +gcc-10.patch