SMS Server Tools 3
 Menu
Basic information:
Additional information:
Support:
Get SMS Server Tools 3:
Additional Options

 Sponsored links

 Search
Custom Search

 Visitor locations
 
 SMS Server Tools 3 Community
Welcome, Guest. The forum is currently read-only, but will open soon. Sat Dec 21, 2024 14:17
SMSTools3 Community » Bug reports Bottom

[fixed in 3.1.5] PATCH: make smstools compile on old GCC

  This topic is locked

Page:  1

Author Post
Member
Registered:
May 2009
Smstools doesn't compile on old GCC. The patch below fixed it.

Regards,
Simon

diff -Naur smstools3.orig/src/modeminit.c smstools3/src/modeminit.c
--- smstools3.orig/src/modeminit.c      2009-05-05 18:29:52.000000000 +0200
+++ smstools3/src/modeminit.c   2009-05-16 16:44:12.000000000 +0200
@@ -1267,6 +1267,7 @@
   int retries = 0;
   int registration_denied = 0;
   static int registration_ok = 0;
+  char *p;
 
   writelogfile(LOG_INFO, "Checking if Modem is registered to the network");
 
@@ -1284,7 +1285,6 @@
     put_command(modem, device, "AT+CREG?\r", answer, sizeof(answer), 2, "(\\+CREG:.*OK)|(ERROR)");
 
     // 3.1.1: Some modem include spaces in the response:
-    char *p;
     while ((p = strchr(answer, ' ')))
       strcpy(p, p +1);
 
diff -Naur smstools3.orig/src/smsd_cfg.c smstools3/src/smsd_cfg.c
--- smstools3.orig/src/smsd_cfg.c       2009-05-11 18:06:35.000000000 +0200
+++ smstools3/src/smsd_cfg.c    2009-05-16 16:43:36.000000000 +0200
@@ -1317,6 +1317,7 @@
 void parsearguments(int argc,char** argv)
 {
   int result;
+  int i;
   strcpy(configfile,"/etc/smsd.conf");
   printstatus=0;
   arg_infofile[0] = 0;
@@ -1328,8 +1329,6 @@
   communicate[0] = 0;
 
   // 3.1.1: Start and stop options are provided by the script, not by the daemon:
-  int i;
-
   for (i = 1; i < argc; i++)
   {
     if (!strcasecmp(argv[i], "START") || !strcasecmp(argv[i], "STOP"))
 
'diff' Syntax Highlight powered by GeSHi


Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
This fix will be included in the next release.

I'm trying to remember this old and good variable placing rule while making future changes. ;)

  This topic is locked

Page:  1

SMSTools3 Community » Bug reports Top

 
Time in this board is UTC.  

Privacy Policy   SMS Server Tools 3 Copyright © Keijo Kasvi.