irssistats uses nested functions (cf. irssistats.c:1566). It seems to me that nested functions are not part of the C standard (they are a GCC extension), which makes irssistats impossible to compile with compilers that do not support this feature. For example, clang fails to compile it.
-void parse_config(char *configfile)
- void expand(char *path)
+ char temp[MAXLINELENGTH];
+ if (*path=='~')
- char temp[MAXLINELENGTH];
- if (*path=='~')
- {
- snprintf(temp,MAXLINELENGTH-1,"%s%s",getenv("HOME"),path+1);
- temp[MAXLINELENGTH-1]='\0';
- strcpy(path,temp);
- }
+ snprintf(temp,MAXLINELENGTH-1,"%s%s",getenv("HOME"),path+1);
+ temp[MAXLINELENGTH-1]='\0';
+ strcpy(path,temp);
+}
+
+void parse_config(char *configfile)
+{
FILE *fic;
char line[MAXLINELENGTH];
char keyword[MAXLINELENGTH];
FILE *fic;
char line[MAXLINELENGTH];
char keyword[MAXLINELENGTH];