summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-connectivity/smstools3
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2020-08-13 17:00:55 -0700
committerKhem Raj <raj.khem@gmail.com>2020-08-13 22:37:48 -0700
commit33299870ca98490de3724c3ff6787e3d525ed360 (patch)
tree664ea6173e33e0eeec62158e67a659925f1673d6 /meta-oe/recipes-connectivity/smstools3
parentf826560497f07f143ad609dcb471c9289d4e22e4 (diff)
downloadmeta-openembedded-33299870ca98490de3724c3ff6787e3d525ed360.tar.gz
smstools3: Fix build with -fno-common
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-connectivity/smstools3')
-rw-r--r--meta-oe/recipes-connectivity/smstools3/smstools3/0001-Make-extern-declarations-to-avoid-duplicate-var-defi.patch606
-rw-r--r--meta-oe/recipes-connectivity/smstools3/smstools3_3.1.21.bb4
2 files changed, 609 insertions, 1 deletions
diff --git a/meta-oe/recipes-connectivity/smstools3/smstools3/0001-Make-extern-declarations-to-avoid-duplicate-var-defi.patch b/meta-oe/recipes-connectivity/smstools3/smstools3/0001-Make-extern-declarations-to-avoid-duplicate-var-defi.patch
new file mode 100644
index 0000000000..c714f74916
--- /dev/null
+++ b/meta-oe/recipes-connectivity/smstools3/smstools3/0001-Make-extern-declarations-to-avoid-duplicate-var-defi.patch
@@ -0,0 +1,606 @@
1From 77532d2e99252e3e07afa0f918bb8c9d73798f39 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 13 Aug 2020 16:56:22 -0700
4Subject: [PATCH] Make extern declarations to avoid duplicate var definitions
5
6gcc-10+ defaults to -fno-common which flags these errors about mulitple
7definitions since the variables are defined in header files which are
8included from multiple sources, this patch ensures that extern
9declaration is added appropriately
10
11Upstream-Status: Pending
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 src/blacklist.c | 2 +-
15 src/blacklist.h | 2 +-
16 src/charset.c | 2 +-
17 src/charshift.c | 2 +-
18 src/logging.c | 2 +-
19 src/logging.h | 4 +-
20 src/modeminit.c | 6 +-
21 src/smsd_cfg.c | 2 +
22 src/smsd_cfg.h | 274 ++++++++++++++++++++++++------------------------
23 src/stats.h | 22 ++--
24 src/whitelist.c | 2 +-
25 src/whitelist.h | 2 +-
26 12 files changed, 164 insertions(+), 158 deletions(-)
27
28diff --git a/src/blacklist.c b/src/blacklist.c
29index 7440cca..0c00dd9 100755
30--- a/src/blacklist.c
31+++ b/src/blacklist.c
32@@ -17,11 +17,11 @@ Either version 2 of the License, or (at your option) any later version.
33 #include <stdlib.h>
34 #include <string.h>
35 #include <signal.h>
36+#include "smsd_cfg.h"
37 #include "blacklist.h"
38 #include "extras.h"
39 #include "logging.h"
40 #include "alarm.h"
41-#include "smsd_cfg.h"
42
43 int inblacklist(char* msisdn)
44 {
45diff --git a/src/blacklist.h b/src/blacklist.h
46index 4f99050..61fd294 100755
47--- a/src/blacklist.h
48+++ b/src/blacklist.h
49@@ -15,7 +15,7 @@ Either version 2 of the License, or (at your option) any later version.
50 #ifndef BLACK_H
51 #define BLACK_H
52
53-char blacklist[256]; // Filename of the black-list
54+EXTERN char blacklist[256]; // Filename of the black-list
55
56 int inblacklist(char* msisdn);
57
58diff --git a/src/charset.c b/src/charset.c
59index cd7c997..1716d70 100755
60--- a/src/charset.c
61+++ b/src/charset.c
62@@ -19,9 +19,9 @@ Either version 2 of the License, or (at your option) any later version.
63 #include <syslog.h>
64 #include <ctype.h>
65
66+#include "smsd_cfg.h"
67 #include "charset.h"
68 #include "logging.h"
69-#include "smsd_cfg.h"
70 #include "pdu.h"
71 #include "extras.h"
72 #include "charshift.h"
73diff --git a/src/charshift.c b/src/charshift.c
74index 48ba340..2d7b26c 100755
75--- a/src/charshift.c
76+++ b/src/charshift.c
77@@ -25,8 +25,8 @@ Either version 2 of the License, or (at your option) any later version.
78 #include <stdio.h>
79 #include <stdarg.h>
80
81-#include "logging.h"
82 #include "smsd_cfg.h"
83+#include "logging.h"
84 #include "pdu.h"
85 #include "charset.h"
86 #include "extras.h"
87diff --git a/src/logging.c b/src/logging.c
88index 6ee2c4e..4af341f 100755
89--- a/src/logging.c
90+++ b/src/logging.c
91@@ -12,6 +12,7 @@ the GNU General Public License as published by the Free Software Foundation.
92 Either version 2 of the License, or (at your option) any later version.
93 */
94
95+#include "smsd_cfg.h"
96 #include "logging.h"
97 #include "extras.h"
98 #include <stdio.h>
99@@ -22,7 +23,6 @@ Either version 2 of the License, or (at your option) any later version.
100 #include <time.h>
101 #include <fcntl.h>
102 #include <unistd.h>
103-#include "smsd_cfg.h"
104 #include "stats.h"
105
106 int Filehandle = -1;
107diff --git a/src/logging.h b/src/logging.h
108index 4f27906..4550234 100755
109--- a/src/logging.h
110+++ b/src/logging.h
111@@ -18,7 +18,7 @@ Either version 2 of the License, or (at your option) any later version.
112 #include <time.h>
113
114 // 3.1.16beta2: Moved logch() and prch() from charset.c to logging.c:
115-char logch_buffer[8192];
116+EXTERN char logch_buffer[8192];
117
118 #ifdef __GNUC__
119 void logch(char* format, ...) __attribute__ ((format(printf, 1, 2)));
120@@ -30,7 +30,7 @@ char prch(char ch);
121
122 // 3.1.16beta: changed type:
123 //int trouble_logging_started;
124-time_t trouble_logging_started;
125+EXTERN time_t trouble_logging_started;
126
127 int change_loglevel(int new_level);
128 void restore_loglevel();
129diff --git a/src/modeminit.c b/src/modeminit.c
130index 42ff6b4..0d05fe9 100755
131--- a/src/modeminit.c
132+++ b/src/modeminit.c
133@@ -19,8 +19,6 @@ Either version 2 of the License, or (at your option) any later version.
134 #include <regex.h>
135 #include <ctype.h>
136 #include <time.h>
137-#include "logging.h"
138-#include "alarm.h"
139
140 #ifdef SOLARIS
141 #include <sys/filio.h>
142@@ -42,9 +40,11 @@ Either version 2 of the License, or (at your option) any later version.
143 #include <netdb.h>
144 #endif
145
146+#include "smsd_cfg.h"
147+#include "logging.h"
148+#include "alarm.h"
149 #include "extras.h"
150 #include "modeminit.h"
151-#include "smsd_cfg.h"
152 #include "version.h"
153 #include "pdu.h"
154 #include "stats.h"
155diff --git a/src/smsd_cfg.c b/src/smsd_cfg.c
156index 35c1198..32472b4 100755
157--- a/src/smsd_cfg.c
158+++ b/src/smsd_cfg.c
159@@ -26,6 +26,8 @@ Either version 2 of the License, or (at your option) any later version.
160 #include <ctype.h>
161 #include <grp.h>
162
163+#define EXTERN
164+
165 #include "extras.h"
166 #include "cfgfile.h"
167 #include "smsd_cfg.h"
168diff --git a/src/smsd_cfg.h b/src/smsd_cfg.h
169index 8ae208d..d6ece37 100755
170--- a/src/smsd_cfg.h
171+++ b/src/smsd_cfg.h
172@@ -15,6 +15,10 @@ Either version 2 of the License, or (at your option) any later version.
173 #ifndef SMSD_CFG_H
174 #define SMSD_CFG_H
175
176+#ifndef EXTERN
177+#define EXTERN extern
178+#endif
179+
180 #include <limits.h>
181 #include <sys/types.h>
182 #include <time.h>
183@@ -126,17 +130,17 @@ Either version 2 of the License, or (at your option) any later version.
184 #define ALPHABET_UNKNOWN 4
185 #define ALPHABET_DEFAULT 0
186
187-char process_title[32]; // smsd for main task, NOTIFIER or CHILD, name of a modem for other tasks.
188-int process_id; // -1 for main task, all modems have numbers starting with 0.
189+EXTERN char process_title[32]; // smsd for main task, NOTIFIER or CHILD, name of a modem for other tasks.
190+EXTERN int process_id; // -1 for main task, all modems have numbers starting with 0.
191 // This is the same as device, can be used like devices[process_id] if IS_MODEM_PROCESS.
192
193-time_t process_start_time;
194+EXTERN time_t process_start_time;
195
196-int modem_handle; // Handle for modem.
197+EXTERN int modem_handle; // Handle for modem.
198
199-int put_command_timeouts;
200-unsigned long long put_command_sent; // 3.1.16beta.
201-char tmpdir[PATH_MAX]; // 3.1.16beta.
202+EXTERN int put_command_timeouts;
203+EXTERN unsigned long long put_command_sent; // 3.1.16beta.
204+EXTERN char tmpdir[PATH_MAX]; // 3.1.16beta.
205
206 typedef struct
207 {
208@@ -284,204 +288,204 @@ typedef struct
209
210 // NOTE for regular run intervals: effective value is at least delaytime.
211
212-char configfile[PATH_MAX]; // Path to config file
213-char d_spool[PATH_MAX]; // Spool directory
214-char d_failed[PATH_MAX]; // Failed spool directory
215-char d_failed_copy[PATH_MAX]; // 3.1.17.
216-char d_incoming[PATH_MAX]; // Incoming spool directory
217-char d_incoming_copy[PATH_MAX]; // 3.1.16beta2.
218-char d_report[PATH_MAX]; // Incoming report spool directory
219-char d_report_copy[PATH_MAX]; // 3.1.17.
220-char d_phonecalls[PATH_MAX]; // Incoming phonecalls data directory
221-char d_saved[PATH_MAX]; // Directory for smsd's internal use, concatenation storage files etc.
222-char d_sent[PATH_MAX]; // Sent spool directory
223-char d_sent_copy[PATH_MAX]; // 3.1.17.
224-char d_checked[PATH_MAX]; // Spool directory for checked messages (only used when no provider queues used)
225-char eventhandler[PATH_MAX]; // Global event handler program or script
226-char alarmhandler[PATH_MAX]; // Global alarm handler program or script
227-char checkhandler[PATH_MAX]; // Handler that checks if the sms file is valid.
228-int alarmlevel; // Alarm Level (9=highest). Verbosity of alarm handler.
229-char logfile[PATH_MAX]; // Name or Handle of Log File
230-int loglevel; // Log Level (9=highest). Verbosity of log file.
231-_queue queues[NUMBER_OF_MODEMS]; // Queues
232-_device devices[NUMBER_OF_MODEMS]; // Modem devices
233-int delaytime; // sleep-time after workless
234-int delaytime_mainprocess; // sleep-time after workless, main process. If -1, delaytime is used.
235-int blocktime; // sleep-time after multiple errors
236-int blockafter; // Block modem after n errors
237-int errorsleeptime; // sleep-time after each error
238-int autosplit; // Splitting of large text messages 0=no, 1=yes 2=number with text, 3=number with UDH
239-int receive_before_send; // if 1 smsd tries to receive one message before sending
240-int store_received_pdu; // 0=no, 1=unsupported pdu's only, 2=unsupported and 8bit/unicode, 3=all
241-int store_sent_pdu; // 0=no, 1=failed pdu's only, 2=failed and 8bit/unicode, 3=all
242-int validity_period; // Validity period for messages.
243-int decode_unicode_text; // 1 if unicode text is decoded internally.
244-int internal_combine; // 1 if multipart message is combined internally.
245-int internal_combine_binary; // 1 if multipart binary message is combined internally. Defaults to internal_combine.
246-int keep_filename; // 0 if unique filename is created to each directory when a message file is moved.
247-int store_original_filename; // 1 if an original filename is saved to message file when it's moved from
248+EXTERN char configfile[PATH_MAX]; // Path to config file
249+EXTERN char d_spool[PATH_MAX]; // Spool directory
250+EXTERN char d_failed[PATH_MAX]; // Failed spool directory
251+EXTERN char d_failed_copy[PATH_MAX]; // 3.1.17.
252+EXTERN char d_incoming[PATH_MAX]; // Incoming spool directory
253+EXTERN char d_incoming_copy[PATH_MAX]; // 3.1.16beta2.
254+EXTERN char d_report[PATH_MAX]; // Incoming report spool directory
255+EXTERN char d_report_copy[PATH_MAX]; // 3.1.17.
256+EXTERN char d_phonecalls[PATH_MAX]; // Incoming phonecalls data directory
257+EXTERN char d_saved[PATH_MAX]; // Directory for smsd's internal use, concatenation storage files etc.
258+EXTERN char d_sent[PATH_MAX]; // Sent spool directory
259+EXTERN char d_sent_copy[PATH_MAX]; // 3.1.17.
260+EXTERN char d_checked[PATH_MAX]; // Spool directory for checked messages (only used when no provider queues used)
261+EXTERN char eventhandler[PATH_MAX]; // Global event handler program or script
262+EXTERN char alarmhandler[PATH_MAX]; // Global alarm handler program or script
263+EXTERN char checkhandler[PATH_MAX]; // Handler that checks if the sms file is valid.
264+EXTERN int alarmlevel; // Alarm Level (9=highest). Verbosity of alarm handler.
265+EXTERN char logfile[PATH_MAX]; // Name or Handle of Log File
266+EXTERN int loglevel; // Log Level (9=highest). Verbosity of log file.
267+EXTERN _queue queues[NUMBER_OF_MODEMS]; // Queues
268+EXTERN _device devices[NUMBER_OF_MODEMS]; // Modem devices
269+EXTERN int delaytime; // sleep-time after workless
270+EXTERN int delaytime_mainprocess; // sleep-time after workless, main process. If -1, delaytime is used.
271+EXTERN int blocktime; // sleep-time after multiple errors
272+EXTERN int blockafter; // Block modem after n errors
273+EXTERN int errorsleeptime; // sleep-time after each error
274+EXTERN int autosplit; // Splitting of large text messages 0=no, 1=yes 2=number with text, 3=number with UDH
275+EXTERN int receive_before_send; // if 1 smsd tries to receive one message before sending
276+EXTERN int store_received_pdu; // 0=no, 1=unsupported pdu's only, 2=unsupported and 8bit/unicode, 3=all
277+EXTERN int store_sent_pdu; // 0=no, 1=failed pdu's only, 2=failed and 8bit/unicode, 3=all
278+EXTERN int validity_period; // Validity period for messages.
279+EXTERN int decode_unicode_text; // 1 if unicode text is decoded internally.
280+EXTERN int internal_combine; // 1 if multipart message is combined internally.
281+EXTERN int internal_combine_binary; // 1 if multipart binary message is combined internally. Defaults to internal_combine.
282+EXTERN int keep_filename; // 0 if unique filename is created to each directory when a message file is moved.
283+EXTERN int store_original_filename; // 1 if an original filename is saved to message file when it's moved from
284 // outgoing directory to spooler. Works together with keep_filename.
285-int date_filename; // 1 or 2 if YYYYMMDD is included to the filename of incoming message.
286-char regular_run[PATH_MAX]; // Script/program which is run regularly.
287-int regular_run_interval; // Number of seconds between running a regular_run script/progdam.
288-char admin_to[SIZE_TO]; // Destination number for administrative messages.
289-int filename_preview; // Number of chars of message text to concatenate to filename.
290-int incoming_utf8; // 1 if incoming files are saved using UTF-8 character set.
291-int outgoing_utf8; // 1 if outgoing files are automatically converted from UTF-8 to ISO and GSM.
292-int log_charconv; // 1 if character set conversion is logged.
293-int log_single_lines; // 1 if linefeeds are removed from the modem response to be logged.
294-int executable_check; // 0 if eventhandler and other executables are NOT checked during the startup checking.
295-int keep_messages; // For testing purposes: messages are not deleted and smsd stops after first run.
296-char priviledged_numbers[SIZE_PRIVILEDGED_NUMBERS]; // Priviledged numbers in incoming messages.
297-int ic_purge_hours; // If internal_combine is used, concatenation storage is checked every ic_purge_interval minutes
298-int ic_purge_minutes; // and if there is message parts older than defined, they are handled or deleted.
299-int ic_purge_read; // 1 = message parts are stored as single messages. 0 = parts are just deleted.
300-int ic_purge_interval; //
301-char shell[PATH_MAX]; // Shell used to run eventhandler, defaults to /bin/sh
302-char adminmessage_device[32]; // Name of device used to send administrative messages of mainspooler.
303-int smart_logging; // 1 = if loglevel is less than 7, degug log is written is there has been any errors.
304-int status_signal_quality; // 1 = signal quality is written to status file.
305-int status_include_counters; // 1 = succeeded, failed and received counters are included in the status line.
306-int status_include_uptime; // 3.1.16beta: 1 = include started & uptime line in the status file.
307-int hangup_incoming_call; // 1 = if detected unexpected input contains RING and we want to end call.
308-int max_continuous_sending; // Defines when sending is breaked to do check/do other tasks. Time in minutes.
309-int voicecall_hangup_ath; // If ATH is used instead of AT+CHUP.
310+EXTERN int date_filename; // 1 or 2 if YYYYMMDD is included to the filename of incoming message.
311+EXTERN char regular_run[PATH_MAX]; // Script/program which is run regularly.
312+EXTERN int regular_run_interval; // Number of seconds between running a regular_run script/progdam.
313+EXTERN char admin_to[SIZE_TO]; // Destination number for administrative messages.
314+EXTERN int filename_preview; // Number of chars of message text to concatenate to filename.
315+EXTERN int incoming_utf8; // 1 if incoming files are saved using UTF-8 character set.
316+EXTERN int outgoing_utf8; // 1 if outgoing files are automatically converted from UTF-8 to ISO and GSM.
317+EXTERN int log_charconv; // 1 if character set conversion is logged.
318+EXTERN int log_single_lines; // 1 if linefeeds are removed from the modem response to be logged.
319+EXTERN int executable_check; // 0 if eventhandler and other executables are NOT checked during the startup checking.
320+EXTERN int keep_messages; // For testing purposes: messages are not deleted and smsd stops after first run.
321+EXTERN char priviledged_numbers[SIZE_PRIVILEDGED_NUMBERS]; // Priviledged numbers in incoming messages.
322+EXTERN int ic_purge_hours; // If internal_combine is used, concatenation storage is checked every ic_purge_interval minutes
323+EXTERN int ic_purge_minutes; // and if there is message parts older than defined, they are handled or deleted.
324+EXTERN int ic_purge_read; // 1 = message parts are stored as single messages. 0 = parts are just deleted.
325+EXTERN int ic_purge_interval; //
326+EXTERN char shell[PATH_MAX]; // Shell used to run eventhandler, defaults to /bin/sh
327+EXTERN char adminmessage_device[32]; // Name of device used to send administrative messages of mainspooler.
328+EXTERN int smart_logging; // 1 = if loglevel is less than 7, degug log is written is there has been any errors.
329+EXTERN int status_signal_quality; // 1 = signal quality is written to status file.
330+EXTERN int status_include_counters; // 1 = succeeded, failed and received counters are included in the status line.
331+EXTERN int status_include_uptime; // 3.1.16beta: 1 = include started & uptime line in the status file.
332+EXTERN int hangup_incoming_call; // 1 = if detected unexpected input contains RING and we want to end call.
333+EXTERN int max_continuous_sending; // Defines when sending is breaked to do check/do other tasks. Time in minutes.
334+EXTERN int voicecall_hangup_ath; // If ATH is used instead of AT+CHUP.
335
336 // 3.1.5:
337-int trust_outgoing; // 1 = it's _sure_ that files are created by rename AND permissions are correct. Speeds up spooling.
338+EXTERN int trust_outgoing; // 1 = it's _sure_ that files are created by rename AND permissions are correct. Speeds up spooling.
339
340 // 3.1.5:
341-int ignore_outgoing_priority; // 1 = Priority: high header is not checked. Speeds up spooling.
342+EXTERN int ignore_outgoing_priority; // 1 = Priority: high header is not checked. Speeds up spooling.
343
344 // 3.1.7:
345-int ignore_exec_output; // 1 = stdout and stderr of eventhandlers is _not_ checked.
346+EXTERN int ignore_exec_output; // 1 = stdout and stderr of eventhandlers is _not_ checked.
347
348 // 3.1.7:
349-mode_t conf_umask; // File mode creation mask for smsd and modem processes.
350+EXTERN mode_t conf_umask; // File mode creation mask for smsd and modem processes.
351
352 // 3.1.7:
353-int trim_text; // 1 = trailing whitespaces are removed from text:
354+EXTERN int trim_text; // 1 = trailing whitespaces are removed from text:
355
356 // 3.1.7:
357-int use_linux_ps_trick; // 1 = change argv[0] to "smsd: MAINPROCESS", "smsd: GSM1" etc.
358+EXTERN int use_linux_ps_trick; // 1 = change argv[0] to "smsd: MAINPROCESS", "smsd: GSM1" etc.
359
360 // 3.1.7:
361-int log_unmodified;
362+EXTERN int log_unmodified;
363
364 // 3.1.7:
365-char suspend_filename[PATH_MAX];
366+EXTERN char suspend_filename[PATH_MAX];
367
368 // 3.1.9:
369-int spool_directory_order;
370+EXTERN int spool_directory_order;
371
372 // 3.1.9: 1 if read_from_modem is logged.
373-int log_read_from_modem;
374+EXTERN int log_read_from_modem;
375
376 // 3.1.16beta2: log_read_timing for performance tuning.
377-int log_read_timing;
378+EXTERN int log_read_timing;
379
380 // 3.1.16beta:
381-int log_response_time;
382+EXTERN int log_response_time;
383
384 // 3.1.16beta2:
385-int default_alphabet;
386+EXTERN int default_alphabet;
387
388 // 3.1.17: Child process for the mainprocess:
389-char mainprocess_child[PATH_MAX];
390-char mainprocess_child_args[PATH_MAX];
391+EXTERN char mainprocess_child[PATH_MAX];
392+EXTERN char mainprocess_child_args[PATH_MAX];
393
394 // 3.1.17: Notifier for the mainprocess:
395-int mainprocess_notifier;
396+EXTERN int mainprocess_notifier;
397
398 // 3.1.17: If *_copy was made, evenhandler can use it instead of original file:
399-int eventhandler_use_copy;
400+EXTERN int eventhandler_use_copy;
401
402 // 3.1.17: This defines how long to sleep while looping:
403-int sleeptime_mainprocess;
404+EXTERN int sleeptime_mainprocess;
405
406 // 3.1.17: Defines how often PID is checked to detect if another smsd is running:
407-int check_pid_interval;
408+EXTERN int check_pid_interval;
409
410 // 3.1.18: start script/program for mainprocess:
411-char mainprocess_start[PATH_MAX];
412-char mainprocess_start_args[PATH_MAX];
413+EXTERN char mainprocess_start[PATH_MAX];
414+EXTERN char mainprocess_start_args[PATH_MAX];
415
416-int message_count; // Counter for sent messages. Multipart message is one message.
417+EXTERN int message_count; // Counter for sent messages. Multipart message is one message.
418
419-volatile sig_atomic_t break_workless_delay; // To break the delay when SIGCONT is received.
420-volatile sig_atomic_t terminate; // To terminate when SIGTERM is received.
421+EXTERN volatile sig_atomic_t break_workless_delay; // To break the delay when SIGCONT is received.
422+EXTERN volatile sig_atomic_t terminate; // To terminate when SIGTERM is received.
423
424-char username[65]; // user and group name which are used to run.
425-char groupname[65]; // (max length is just a guess)
426+EXTERN char username[65]; // user and group name which are used to run.
427+EXTERN char groupname[65]; // (max length is just a guess)
428
429-char infofile[PATH_MAX]; // Hepler file for stopping the smsd smoothly.
430-char pidfile[PATH_MAX]; // File where a process id is stored.
431+EXTERN char infofile[PATH_MAX]; // Hepler file for stopping the smsd smoothly.
432+EXTERN char pidfile[PATH_MAX]; // File where a process id is stored.
433
434 // Command line arguments:
435-char arg_username[65];
436-char arg_groupname[65];
437-char arg_infofile[PATH_MAX];
438-char arg_pidfile[PATH_MAX];
439-char arg_logfile[PATH_MAX];
440-int arg_terminal;
441+EXTERN char arg_username[65];
442+EXTERN char arg_groupname[65];
443+EXTERN char arg_infofile[PATH_MAX];
444+EXTERN char arg_pidfile[PATH_MAX];
445+EXTERN char arg_logfile[PATH_MAX];
446+EXTERN int arg_terminal;
447 // 3.1.7:
448-char arg_7bit_packed[512];
449-int do_encode_decode_arg_7bit_packed;
450+EXTERN char arg_7bit_packed[512];
451+EXTERN int do_encode_decode_arg_7bit_packed;
452
453-int terminal; // 1 if smsd is communicating with terminal.
454-pid_t device_pids[NUMBER_OF_MODEMS]; // Pid's of modem processes.
455-char run_info[PATH_MAX]; // Information about external script/program execution.
456+EXTERN int terminal; // 1 if smsd is communicating with terminal.
457+EXTERN pid_t device_pids[NUMBER_OF_MODEMS]; // Pid's of modem processes.
458+EXTERN char run_info[PATH_MAX]; // Information about external script/program execution.
459
460-char communicate[32]; // Device name for terminal communication mode.
461+EXTERN char communicate[32]; // Device name for terminal communication mode.
462
463-char international_prefixes[PATH_MAX +1];
464-char national_prefixes[PATH_MAX +1];
465+EXTERN char international_prefixes[PATH_MAX +1];
466+EXTERN char national_prefixes[PATH_MAX +1];
467
468 // Storage for startup errors:
469-char *startup_err_str;
470-int startup_err_count;
471+EXTERN char *startup_err_str;
472+EXTERN int startup_err_count;
473
474 // Storage for PDU's:
475-char *incoming_pdu_store;
476-char *outgoing_pdu_store;
477-char *routed_pdu_store;
478+EXTERN char *incoming_pdu_store;
479+EXTERN char *outgoing_pdu_store;
480+EXTERN char *routed_pdu_store;
481
482 // Storage for getfile errors:
483-char *getfile_err_store;
484+EXTERN char *getfile_err_store;
485
486 // Text buffer for error messages:
487-char tb[SIZE_TB];
488+EXTERN char tb[SIZE_TB];
489
490 // Buffer for SIM memory checking:
491-char *check_memory_buffer;
492-size_t check_memory_buffer_size;
493+EXTERN char *check_memory_buffer;
494+EXTERN size_t check_memory_buffer_size;
495
496-int os_cygwin; // 1 if we are on Cygwin.
497+EXTERN int os_cygwin; // 1 if we are on Cygwin.
498
499-char language_file[PATH_MAX]; // File name of translated headers.
500-char yes_chars[SIZE_HEADER]; // Characters which mean "yes" in the yesno() question.
501-char no_chars[SIZE_HEADER]; // See details inside read_translation() function.
502-char yes_word[SIZE_HEADER]; // "yes" printed as an output.
503-char no_word[SIZE_HEADER]; // "no"
504-char datetime_format[SIZE_HEADER]; // strftime format string for time stamps (not inside status reports).
505-char logtime_format[SIZE_HEADER]; // 3.1.7: strftime format string for logging time stamps
506-char date_filename_format[SIZE_HEADER]; // 3.1.7: strftime format string for date_filename
507-int translate_incoming; // 0 if incoming message headers are NOT transtaled.
508+EXTERN char language_file[PATH_MAX]; // File name of translated headers.
509+EXTERN char yes_chars[SIZE_HEADER]; // Characters which mean "yes" in the yesno() question.
510+EXTERN char no_chars[SIZE_HEADER]; // See details inside read_translation() function.
511+EXTERN char yes_word[SIZE_HEADER]; // "yes" printed as an output.
512+EXTERN char no_word[SIZE_HEADER]; // "no"
513+EXTERN char datetime_format[SIZE_HEADER]; // strftime format string for time stamps (not inside status reports).
514+EXTERN char logtime_format[SIZE_HEADER]; // 3.1.7: strftime format string for logging time stamps
515+EXTERN char date_filename_format[SIZE_HEADER]; // 3.1.7: strftime format string for date_filename
516+EXTERN int translate_incoming; // 0 if incoming message headers are NOT transtaled.
517
518 // 3.1.14:
519-int logtime_us;
520-int logtime_ms;
521+EXTERN int logtime_us;
522+EXTERN int logtime_ms;
523
524 // 3.1.14:
525-int shell_test;
526+EXTERN int shell_test;
527
528 // Next two are for debugging purposes:
529-int enable_smsd_debug;
530-char smsd_debug[SIZE_SMSD_DEBUG]; // Header of an outgoing message file.
531+EXTERN int enable_smsd_debug;
532+EXTERN char smsd_debug[SIZE_SMSD_DEBUG]; // Header of an outgoing message file.
533
534 // 3.1.20: Alt keys in communication mode:
535 #define COMMUNICATE_A_KEY_COUNT 10
536-char communicate_a_keys[COMMUNICATE_A_KEY_COUNT][256];
537+EXTERN char communicate_a_keys[COMMUNICATE_A_KEY_COUNT][256];
538
539 /* initialize all variable with default values */
540
541diff --git a/src/stats.h b/src/stats.h
542index bd5cdc9..a614af1 100755
543--- a/src/stats.h
544+++ b/src/stats.h
545@@ -33,17 +33,17 @@ typedef struct
546 int ber;
547 } _stats;
548
549-_stats* statistics[NUMBER_OF_MODEMS]; // Statistic data (shared memory!)
550-int rejected_counter; // Statistic counter, rejected SM, number does not fit into any queue
551-time_t start_time; // Start time of smsd, allows statistic functions
552-int printstatus; // if 1 smsd outputs status on stdout
553-time_t last_stats; // time when the last stats file was created
554-char d_stats[PATH_MAX]; // path to statistic files
555-int stats_interval; // time between statistic files in seconds.
556-int stats_no_zeroes; // Suppress files that contain only zeroes
557-int status_interval; // time between updating status file in seconds
558-
559-char *shared_buffer;
560+EXTERN _stats* statistics[NUMBER_OF_MODEMS]; // Statistic data (shared memory!)
561+EXTERN int rejected_counter; // Statistic counter, rejected SM, number does not fit into any queue
562+EXTERN time_t start_time; // Start time of smsd, allows statistic functions
563+EXTERN int printstatus; // if 1 smsd outputs status on stdout
564+EXTERN time_t last_stats; // time when the last stats file was created
565+EXTERN char d_stats[PATH_MAX]; // path to statistic files
566+EXTERN int stats_interval; // time between statistic files in seconds.
567+EXTERN int stats_no_zeroes; // Suppress files that contain only zeroes
568+EXTERN int status_interval; // time between updating status file in seconds
569+
570+EXTERN char *shared_buffer;
571
572 /* Creates shared memory variables for statistic data */
573
574diff --git a/src/whitelist.c b/src/whitelist.c
575index 4ee7a69..3d90bf4 100755
576--- a/src/whitelist.c
577+++ b/src/whitelist.c
578@@ -17,11 +17,11 @@ Either version 2 of the License, or (at your option) any later version.
579 #include <stdlib.h>
580 #include <string.h>
581 #include <signal.h>
582+#include "smsd_cfg.h"
583 #include "whitelist.h"
584 #include "extras.h"
585 #include "logging.h"
586 #include "alarm.h"
587-#include "smsd_cfg.h"
588
589 /* Used with >= 3.1x */
590 int inwhitelist_q(char* msisdn, char *queuename)
591diff --git a/src/whitelist.h b/src/whitelist.h
592index 88aea86..3f904f4 100755
593--- a/src/whitelist.h
594+++ b/src/whitelist.h
595@@ -15,7 +15,7 @@ Either version 2 of the License, or (at your option) any later version.
596 #ifndef WHITE_H
597 #define WHITE_H
598
599-char whitelist[256]; // Filename of the white-list
600+EXTERN char whitelist[256]; // Filename of the white-list
601
602 /* Used with >= 3.1x */
603 int inwhitelist_q(char* msisdn, char *queuename);
604--
6052.28.0
606
diff --git a/meta-oe/recipes-connectivity/smstools3/smstools3_3.1.21.bb b/meta-oe/recipes-connectivity/smstools3/smstools3_3.1.21.bb
index 6e6413b4bc..ca40957531 100644
--- a/meta-oe/recipes-connectivity/smstools3/smstools3_3.1.21.bb
+++ b/meta-oe/recipes-connectivity/smstools3/smstools3_3.1.21.bb
@@ -7,7 +7,9 @@ HOMEPAGE = "http://smstools3.kekekasvi.com"
7 7
8SRC_URI = "http://smstools3.kekekasvi.com/packages/${BP}.tar.gz \ 8SRC_URI = "http://smstools3.kekekasvi.com/packages/${BP}.tar.gz \
9 file://sms_binpath.patch \ 9 file://sms_binpath.patch \
10 file://scripts_no_bash.patch" 10 file://scripts_no_bash.patch \
11 file://0001-Make-extern-declarations-to-avoid-duplicate-var-defi.patch \
12 "
11 13
12SRC_URI[md5sum] = "6a9f038fb38a49cc3a4f8f14a88fb8af" 14SRC_URI[md5sum] = "6a9f038fb38a49cc3a4f8f14a88fb8af"
13SRC_URI[sha256sum] = "a26ba4c02b16f6cf13177bffca6c9230dc5fefaeba8e3030cd4e4905f6a92084" 15SRC_URI[sha256sum] = "a26ba4c02b16f6cf13177bffca6c9230dc5fefaeba8e3030cd4e4905f6a92084"