florian-sander / stats.mod

stats.mod is a module which equips your eggdrop with the ability to create various statistics about your channels.
http://www.kreativrauschen.com/stats.mod/
9 stars 5 forks source link

Eggdrop 1.8 compatibility #9

Open florian-sander opened 7 years ago

florian-sander commented 7 years ago

The currently released versions do not support eggdrop 1.8. I have commited some changes which will allow the module to load on eggdrop 1.8, but I do not know if further changes are required.

If someone can confirm that the most current version on GitHub works on Eggdrop 1.8, I can release it as a new numbered version.

This affects both 1.3.x as well as 1.4.x

OldBlacky commented 7 years ago

I've tried to compile the current version with the most recent Eggdrop version on Ubuntu Server 16.04.1 x64 and got the following warnings and errors:

make[2]: Entering directory '~/src/eggdrop-1.8.0/src/mod/stats.mod' gcc -fPIC -g -O2 -pipe -Wall -I. -I../../.. -I../../.. -I../../../src/mod -DHAVE_CONFIG_H -I/usr/include/tcl8.6 -DMAKING_MODS -c stats.c In file included from ../../../src/main.h:85:0, from ../module.h:27, from stats.c:36: ./core/slang.c: In function ‘slang_create’: ./core/slang.c:73:57: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] debug2("Creating language '%s' starting by %d", lang, (int) list); ^ ../../../src/eggdrop.h:331:57: note: in definition of macro ‘debug2’

define debug2(x,a1,a2) putlog(LOG_DEBUG,"*",x,a1,a2)

                                                     ^

In file included from core/core.c:85:0, from stats.c:93: ./core/mini_httpd.c: In function ‘httpd_accept’: ./core/mini_httpd.c:621:31: warning: passing argument 2 of ‘(int ()(int, sockname_t , short unsigned int , int))(global + 608u)’ from incompatible pointer type [-Wincompatible-pointer-types] j = answer(dcc[idx].sock, s, &ip, &port, 0); ^ ./core/mini_httpd.c:621:31: note: expected ‘sockname_t {aka struct }’ but argument is of type ‘char ’ ./core/mini_httpd.c:621:34: warning: passing argument 3 of ‘(int ()(int, sockname_t , short unsigned int , int))(global + 608u)’ from incompatible pointer type [-Wincompatible-pointer-types] j = answer(dcc[idx].sock, s, &ip, &port, 0); ^ ./core/mini_httpd.c:621:34: note: expected ‘short unsigned int ’ but argument is of type ‘long unsigned int ’ ./core/mini_httpd.c:621:39: warning: passing argument 4 of ‘(int ()(int, sockname_t , short unsigned int , int))(global + 608u)’ makes integer from pointer without a cast [-Wint-conversion] j = answer(dcc[idx].sock, s, &ip, &port, 0); ^ ./core/mini_httpd.c:621:39: note: expected ‘int’ but argument is of type ‘short unsigned int ’ In file included from stats.c:36:0: ../module.h:193:16: error: too many arguments to function ‘(int ()(int, sockname_t , short unsigned int , int))(global + 608u)’

define answer ((int () (int, sockname_t , unsigned short *, int))global[76])

            ^

./core/mini_httpd.c:621:9: note: in expansion of macro ‘answer’ j = answer(dcc[idx].sock, s, &ip, &port, 0); ^ In file included from core/core.c:85:0, from stats.c:93: ./core/mini_httpd.c:628:32: warning: passing argument 2 of ‘(int ()(int, sockname_t , short unsigned int , int))(global + 608u)’ from incompatible pointer type [-Wincompatible-pointer-types] sock = answer(dcc[idx].sock, s, &ip, &port, 0); ^ ./core/mini_httpd.c:628:32: note: expected ‘sockname_t {aka struct }’ but argument is of type ‘char ’ ./core/mini_httpd.c:628:35: warning: passing argument 3 of ‘(int ()(int, sockname_t , short unsigned int , int))(global + 608u)’ from incompatible pointer type [-Wincompatible-pointer-types] sock = answer(dcc[idx].sock, s, &ip, &port, 0); ^ ./core/mini_httpd.c:628:35: note: expected ‘short unsigned int ’ but argument is of type ‘long unsigned int ’ ./core/mini_httpd.c:628:40: warning: passing argument 4 of ‘(int ()(int, sockname_t , short unsigned int , int))(global + 608u)’ makes integer from pointer without a cast [-Wint-conversion] sock = answer(dcc[idx].sock, s, &ip, &port, 0); ^ ./core/mini_httpd.c:628:40: note: expected ‘int’ but argument is of type ‘short unsigned int ’ In file included from stats.c:36:0: ../module.h:193:16: error: too many arguments to function ‘(int ()(int, sockname_t , short unsigned int , int))(global + 608u)’

define answer ((int () (int, sockname_t , unsigned short *, int))global[76])

            ^

./core/mini_httpd.c:628:10: note: in expansion of macro ‘answer’ sock = answer(dcc[idx].sock, s, &ip, &port, 0); ^ In file included from core/core.c:85:0, from stats.c:93: ./core/mini_httpd.c:630:5: warning: implicit declaration of function ‘neterror’ [-Wimplicit-function-declaration] neterror(s); ^ ./core/mini_httpd.c:644:28: warning: passing argument 1 of ‘(char ()(struct sockaddr ))(global + 1896u)’ makes pointer from integer without a cast [-Wint-conversion] sprintf(s, "%s", iptostr(my_htonl(ip))); ^ ./core/mini_httpd.c:644:28: note: expected ‘struct sockaddr ’ but argument is of type ‘unsigned int’ In file included from core/core.c:97:0, from stats.c:93: ./core/user.c: At top level: ./core/user.c:41:12: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] {"", "", (Function) stats_checkhand, "stat:nkch"}, ^ ./core/user.c:41:12: note: (near initialization for ‘stats_nkch[0].func’) In file included from ./core/templates.c:20:0, from core/core.c:98, from stats.c:93: ./core/templates_content.c: In function ‘templates_content_parseparams’: ./core/templates_content.c:216:24: warning: variable ‘s’ set but not used [-Wunused-but-set-variable] char name, value, s; ^ In file included from core/core.c:99:0, from stats.c:93: ./core/templates_stats_commands.c: In function ‘template_send_value’: ./core/templates_stats_commands.c:361:25: warning: comparison of constant ‘-999’ with boolean expression is always false [-Wbool-compare] if (!glob_timerange == T_ERROR) ^ ./core/templates_stats_commands.c:361:25: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses] In file included from stats.c:106:0: egg_bindings.c: In function ‘eggbnd_minutely’: egg_bindings.c:130:1: warning: no return statement in function returning non-void [-Wreturn-type] } ^ egg_bindings.c: At top level: egg_bindings.c:134:13: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] {"", "", (Function) eggbnd_pubm, "stat"}, ^ egg_bindings.c:134:13: note: (near initialization for ‘stats_pubm[0].func’) egg_bindings.c:140:13: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] {"", "", (Function) eggbnd_topc, "stat"}, ^ egg_bindings.c:140:13: note: (near initialization for ‘stats_topc[0].func’) egg_bindings.c:146:18: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] {"ACTION", "", (Function) eggbnd_action, "stat"}, ^ egg_bindings.c:146:18: note: (near initialization for ‘stats_ctcp[0].func’) egg_bindings.c:152:13: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] {"", "", (Function) eggbnd_kick, "stat"}, ^ egg_bindings.c:152:13: note: (near initialization for ‘stats_kick[0].func’) egg_bindings.c:158:13: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] {"", "", (Function) eggbnd_mode, "stat"}, ^ egg_bindings.c:158:13: note: (near initialization for ‘stats_mode[0].func’) egg_bindings.c:164:13: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] {"", "", (Function) eggbnd_nick, "stat"}, ^ egg_bindings.c:164:13: note: (near initialization for ‘stats_nick[0].func’) egg_bindings.c:170:13: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] {"", "", (Function) eggbnd_join, "stat"}, ^ egg_bindings.c:170:13: note: (near initialization for ‘stats_join[0].func’) egg_bindings.c:176:13: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] {"", "", (Function) eggbnd_part, "stat"}, ^ egg_bindings.c:176:13: note: (near initialization for ‘stats_part[0].func’) egg_bindings.c:182:13: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] {"", "", (Function) eggbnd_sign, "stat"}, ^ egg_bindings.c:182:13: note: (near initialization for ‘stats_sign[0].func’) In file included from core/dynamic_mem_debug.c:58:0, from stats.c:82: ./generic_binary_tree.c:111:12: warning: ‘btree_recursive_expmem’ defined but not used [-Wunused-function] static int btree_recursive_expmem(struct generic_binary_tree tree, struct generic_binary_tree_node node) ^ ./generic_binary_tree.c:198:13: warning: ‘btree_recursive_getall_expanded’ defined but not used [-Wunused-function] static void btree_recursive_getall_expanded(struct generic_binary_tree_node node, ^ In file included from core/core.c:82:0, from stats.c:93: ./core/datahandling.c: In function ‘read_stats’: ./core/datahandling.c:501:5: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(s, SAVESTATSLENGTH - 1, f); ^ Makefile:20: recipe for target '../stats.o' failed make[2]: *** [../stats.o] Error 1

florian-sander commented 7 years ago

Thanks for testing and giving feedback!

I commited a few fixes - blindly again. Since I have no way of testing them myself, could you give them a try?

For stats.mod 1.4 try the branch "eggdrop1.8". For stats.mod 1.3 try the branch "1.3-eggdrop1.8".

OldBlacky commented 7 years ago

Hi,

thanks for your commit. There still seem to be other problem. I've tried your branch "eggdrop1.8" for version 1.4 and now i get the following warning and errors:

In file included from ../../../src/main.h:85:0, from ../module.h:27, from stats.c:36: ./core/slang.c: In function ‘slang_create’: ./core/slang.c:73:57: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] debug2("Creating language '%s' starting by %d", lang, (int) list); ^ ../../../src/eggdrop.h:331:57: note: in definition of macro ‘debug2’

define debug2(x,a1,a2) putlog(LOG_DEBUG,"*",x,a1,a2)

                                                     ^

In file included from core/core.c:85:0, from stats.c:93: ./core/mini_httpd.c: In function ‘httpd_accept’: ./core/mini_httpd.c:628:21: error: ‘LIVESTATS’ undeclared (first use in this function) if ((i = new_dcc(&LIVESTATS, sizeof(struct stats_clientinfo))) == (-1)) { ^ ./core/mini_httpd.c:628:21: note: each undeclared identifier is reported only once for each function it appears in ./core/mini_httpd.c:628:39: error: invalid application of ‘sizeof’ to incomplete type ‘struct stats_clientinfo’ if ((i = new_dcc(&LIVESTATS, sizeof(struct stats_clientinfo))) == (-1)) { ^ ./core/mini_httpd.c:643:47: error: dereferencing pointer to incomplete type ‘struct stats_clientinfo’ ((struct stats_clientinfo ) dcc[i].u.other)->traffic = 0; ^ In file included from core/core.c:97:0, from stats.c:93: ./core/user.c: At top level: ./core/user.c:41:12: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] {"", "", (Function) stats_checkhand, "stat:nkch"}, ^ ./core/user.c:41:12: note: (near initialization for ‘stats_nkch[0].func’) In file included from ./core/templates.c:20:0, from core/core.c:98, from stats.c:93: ./core/templates_content.c: In function ‘templates_content_parseparams’: ./core/templates_content.c:216:24: warning: variable ‘s’ set but not used [-Wunused-but-set-variable] char name, value, s; ^ In file included from core/core.c:99:0, from stats.c:93: ./core/templates_stats_commands.c: In function ‘template_send_value’: ./core/templates_stats_commands.c:361:25: warning: comparison of constant ‘-999’ with boolean expression is always false [-Wbool-compare] if (!glob_timerange == T_ERROR) ^ ./core/templates_stats_commands.c:361:25: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses] In file included from stats.c:106:0: egg_bindings.c: In function ‘eggbnd_minutely’: egg_bindings.c:130:1: warning: no return statement in function returning non-void [-Wreturn-type] } ^ egg_bindings.c: At top level: egg_bindings.c:134:13: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] {"", "", (Function) eggbnd_pubm, "stat"}, ^ egg_bindings.c:134:13: note: (near initialization for ‘stats_pubm[0].func’) egg_bindings.c:140:13: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] {"", "", (Function) eggbnd_topc, "stat"}, ^ egg_bindings.c:140:13: note: (near initialization for ‘stats_topc[0].func’) egg_bindings.c:146:18: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] {"ACTION", "", (Function) eggbnd_action, "stat"}, ^ egg_bindings.c:146:18: note: (near initialization for ‘stats_ctcp[0].func’) egg_bindings.c:152:13: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] {"", "", (Function) eggbnd_kick, "stat"}, ^ egg_bindings.c:152:13: note: (near initialization for ‘stats_kick[0].func’) egg_bindings.c:158:13: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] {"", "", (Function) eggbnd_mode, "stat"}, ^ egg_bindings.c:158:13: note: (near initialization for ‘stats_mode[0].func’) egg_bindings.c:164:13: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] {"", "", (Function) eggbnd_nick, "stat"}, ^ egg_bindings.c:164:13: note: (near initialization for ‘stats_nick[0].func’) egg_bindings.c:170:13: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] {"", "", (Function) eggbnd_join, "stat"}, ^ egg_bindings.c:170:13: note: (near initialization for ‘stats_join[0].func’) egg_bindings.c:176:13: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] {"", "", (Function) eggbnd_part, "stat"}, ^ egg_bindings.c:176:13: note: (near initialization for ‘stats_part[0].func’) egg_bindings.c:182:13: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] {"", "", (Function) eggbnd_sign, "stat"}, ^ egg_bindings.c:182:13: note: (near initialization for ‘stats_sign[0].func’) In file included from core/dynamic_mem_debug.c:58:0, from stats.c:82: ./generic_binary_tree.c:111:12: warning: ‘btree_recursive_expmem’ defined but not used [-Wunused-function] static int btree_recursive_expmem(struct generic_binary_tree tree, struct generic_binary_tree_node node) ^ ./generic_binary_tree.c:198:13: warning: ‘btree_recursive_getall_expanded’ defined but not used [-Wunused-function] static void btree_recursive_getall_expanded(struct generic_binary_tree_node node, ^ In file included from core/core.c:82:0, from stats.c:93: ./core/datahandling.c: In function ‘read_stats’: ./core/datahandling.c:501:5: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(s, SAVESTATSLENGTH - 1, f); ^

Regards, Blacky

solbu commented 7 years ago

I tried the same branch (with stats.md 1.4), and I get this output:

make[2]: Entering directory '/home/kristbot/download/eggdrop/eggdrop-1.8.1/src/mod/stats.mod' gcc -fPIC -g -O2 -pipe -Wall -I. -I../../.. -I../../.. -I../../../src/mod -DHAVE_CONFIG_H -I/usr/include -DMAKING_MODS -c stats.c In file included from ../../../src/main.h:89:0, from ../module.h:27, from stats.c:36: ./core/slang.c: In function ‘slang_create’: ./core/slang.c:73:57: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] debug2("Creating language '%s' starting by %d", lang, (int) list); ^ ../../../src/eggdrop.h:331:57: note: in definition of macro ‘debug2’

define debug2(x,a1,a2) putlog(LOG_DEBUG,"*",x,a1,a2)

                                                     ^

In file included from core/core.c:85:0, from stats.c:93: ./core/mini_httpd.c: In function ‘httpd_accept’: ./core/mini_httpd.c:628:21: error: ‘LIVESTATS’ undeclared (first use in this function) if ((i = new_dcc(&LIVESTATS, sizeof(struct stats_clientinfo))) == (-1)) { ^ ./core/mini_httpd.c:628:21: note: each undeclared identifier is reported only once for each function it appears in ./core/mini_httpd.c:628:39: error: invalid application of ‘sizeof’ to incomplete type ‘struct stats_clientinfo’ if ((i = new_dcc(&LIVESTATS, sizeof(struct stats_clientinfo))) == (-1)) { ^ ./core/mini_httpd.c:643:47: error: dereferencing pointer to incomplete type ((struct stats_clientinfo ) dcc[i].u.other)->traffic = 0; ^ ./core/mini_httpd.c:644:47: error: dereferencing pointer to incomplete type ((struct stats_clientinfo ) dcc[i].u.other)->code = 200; ^ ./core/mini_httpd.c:645:47: error: dereferencing pointer to incomplete type ((struct stats_clientinfo ) dcc[i].u.other)->browser = NULL; ^ ./core/mini_httpd.c:646:47: error: dereferencing pointer to incomplete type ((struct stats_clientinfo ) dcc[i].u.other)->referer = NULL; ^ ./core/mini_httpd.c:647:47: error: dereferencing pointer to incomplete type ((struct stats_clientinfo ) dcc[i].u.other)->cmd = NULL; ^ In file included from core/core.c:97:0, from stats.c:93: ./core/user.c: At top level: ./core/user.c:41:2: warning: initialization from incompatible pointer type {"", "", (Function) stats_checkhand, "stat:nkch"}, ^ ./core/user.c:41:2: warning: (near initialization for ‘stats_nkch[0].func’) In file included from ./core/templates.c:20:0, from core/core.c:98, from stats.c:93: ./core/templates_content.c: In function ‘templates_content_parseparams’: ./core/templates_content.c:216:24: warning: variable ‘s’ set but not used [-Wunused-but-set-variable] char name, value, s; ^ In file included from stats.c:106:0: egg_bindings.c: In function ‘eggbnd_minutely’: egg_bindings.c:130:1: warning: no return statement in function returning non-void [-Wreturn-type] } ^ egg_bindings.c: At top level: egg_bindings.c:134:3: warning: initialization from incompatible pointer type {"", "", (Function) eggbnd_pubm, "stat"}, ^ egg_bindings.c:134:3: warning: (near initialization for ‘stats_pubm[0].func’) egg_bindings.c:140:3: warning: initialization from incompatible pointer type {"", "", (Function) eggbnd_topc, "stat"}, ^ egg_bindings.c:140:3: warning: (near initialization for ‘stats_topc[0].func’) egg_bindings.c:146:3: warning: initialization from incompatible pointer type {"ACTION", "", (Function) eggbnd_action, "stat"}, ^ egg_bindings.c:146:3: warning: (near initialization for ‘stats_ctcp[0].func’) egg_bindings.c:152:3: warning: initialization from incompatible pointer type {"", "", (Function) eggbnd_kick, "stat"}, ^ egg_bindings.c:152:3: warning: (near initialization for ‘stats_kick[0].func’) egg_bindings.c:158:3: warning: initialization from incompatible pointer type {"", "", (Function) eggbnd_mode, "stat"}, ^ egg_bindings.c:158:3: warning: (near initialization for ‘stats_mode[0].func’) egg_bindings.c:164:3: warning: initialization from incompatible pointer type {"", "", (Function) eggbnd_nick, "stat"}, ^ egg_bindings.c:164:3: warning: (near initialization for ‘stats_nick[0].func’) egg_bindings.c:170:3: warning: initialization from incompatible pointer type {"", "", (Function) eggbnd_join, "stat"}, ^ egg_bindings.c:170:3: warning: (near initialization for ‘stats_join[0].func’) egg_bindings.c:176:3: warning: initialization from incompatible pointer type {"", "", (Function) eggbnd_part, "stat"}, ^ egg_bindings.c:176:3: warning: (near initialization for ‘stats_part[0].func’) egg_bindings.c:182:3: warning: initialization from incompatible pointer type {"", "", (Function) eggbnd_sign, "stat"}, ^ egg_bindings.c:182:3: warning: (near initialization for ‘stats_sign[0].func’) In file included from core/dynamic_mem_debug.c:58:0, from stats.c:82: ./generic_binary_tree.c:111:12: warning: ‘btree_recursive_expmem’ defined but not used [-Wunused-function] static int btree_recursive_expmem(struct generic_binary_tree tree, struct generic_binary_tree_node node) ^ ./generic_binary_tree.c:198:13: warning: ‘btree_recursive_getall_expanded’ defined but not used [-Wunused-function] static void btree_recursive_getall_expanded(struct generic_binary_tree_node node, ^ Makefile:20: recipe for target '../stats.o' failed make[2]: [../stats.o] Error 1 make[2]: Leaving directory '/home/kristbot/download/eggdrop/eggdrop-1.8.1/src/mod/stats.mod' Makefile:61: recipe for target 'stats.mod_so' failed make[1]: [stats.mod_so] Error 2 make[1]: Leaving directory '/home/kristbot/download/eggdrop/eggdrop-1.8.1/src/mod' Makefile:217: recipe for target 'modules' failed make: *** [modules] Error 2

solbu commented 7 years ago

I just tested compiling the 1.3-eggdrop1.8 branch, and got this output:

make[2]: Entering directory '/home/kristbot/download/eggdrop/eggdrop-1.8.1/src/mod/stats.mod' gcc -fPIC -g -O2 -pipe -Wall -I. -I../../.. -I../../.. -I../../../src/mod -DHAVE_CONFIG_H -I/usr/include -DMAKING_MODS -c stats.c In file included from stats.c:132:0: datahandling.c: In function ‘read_stats’: datahandling.c:763:10: warning: variable ‘version’ set but not used [-Wunused-but-set-variable] int i, version, range, month, list, addhosts; ^ In file included from stats.c:134:0: sensors.c: At top level: sensors.c:449:3: warning: initialization from incompatible pointer type {"", "", (Function) sensor_msgm, "stat"}, ^ sensors.c:449:3: warning: (near initialization for ‘stats_pubm[0].func’) sensors.c:455:3: warning: initialization from incompatible pointer type {"", "", (Function) sensor_topc, "stat"}, ^ sensors.c:455:3: warning: (near initialization for ‘stats_topc[0].func’) sensors.c:461:3: warning: initialization from incompatible pointer type {"ACTION", "", (Function) sensor_action, "stat"}, ^ sensors.c:461:3: warning: (near initialization for ‘stats_ctcp[0].func’) sensors.c:467:3: warning: initialization from incompatible pointer type {"", "", (Function) sensor_kick, "stat"}, ^ sensors.c:467:3: warning: (near initialization for ‘stats_kick[0].func’) sensors.c:473:3: warning: initialization from incompatible pointer type {"", "", (Function) sensor_mode, "stat"}, ^ sensors.c:473:3: warning: (near initialization for ‘stats_mode[0].func’) sensors.c:479:3: warning: initialization from incompatible pointer type {"", "", (Function) sensor_nick, "stat"}, ^ sensors.c:479:3: warning: (near initialization for ‘stats_nick[0].func’) sensors.c:485:3: warning: initialization from incompatible pointer type {"", "", (Function) sensor_join, "stat"}, ^ sensors.c:485:3: warning: (near initialization for ‘stats_join[0].func’) sensors.c:491:3: warning: initialization from incompatible pointer type {"", "", (Function) sensor_part, "stat"}, ^ sensors.c:491:3: warning: (near initialization for ‘stats_part[0].func’) sensors.c:497:3: warning: initialization from incompatible pointer type {"", "", (Function) sensor_sign, "stat"}, ^ sensors.c:497:3: warning: (near initialization for ‘stats_sign[0].func’) In file included from stats.c:144:0: user.c:31:3: warning: initialization from incompatible pointer type {"", "", (Function) stats_checkhand, "stat:nkch"}, ^ user.c:31:3: warning: (near initialization for ‘stats_nkch[0].func’) In file included from stats.c:145:0: livestats.c: In function ‘livestats_accept’: livestats.c:343:91: error: ‘errno’ undeclared (first use in this function) putlog(LOG_MISC, "", "Stats.mod: Error accepting livestats connection: %s", strerror(errno)); ^ livestats.c:343:91: note: each undeclared identifier is reported only once for each function it appears in livestats.c: In function ‘send_livestats’: livestats.c:433:14: warning: variable ‘ttbuf’ set but not used [-Wunused-but-set-variable] time_t tt, ttbuf; ^ livestats.c:433:10: warning: variable ‘tt’ set but not used [-Wunused-but-set-variable] time_t tt, ttbuf; ^ Makefile:19: recipe for target '../stats.o' failed make[2]: [../stats.o] Error 1 make[2]: Leaving directory '/home/kristbot/download/eggdrop/eggdrop-1.8.1/src/mod/stats.mod' Makefile:61: recipe for target 'stats.mod_so' failed make[1]: [stats.mod_so] Error 2 make[1]: Leaving directory '/home/kristbot/download/eggdrop/eggdrop-1.8.1/src/mod' Makefile:217: recipe for target 'modules' failed make: *** [modules] Error 2

solbu commented 7 years ago

I just applied the patch from pull request #10 and can confirm that the patch fixes the compilation error in the 1.3-eggdrop1.8 branch.