--- lbbs/src/init.c 2025/06/04 13:27:09 1.22 +++ lbbs/src/init.c 2025/06/16 14:30:44 1.25 @@ -14,6 +14,8 @@ * * ***************************************************************************/ +#define _POSIX_C_SOURCE 200809L + #include "init.h" #include "database.h" #include "bbs.h" @@ -21,12 +23,13 @@ #include "log.h" #include "io.h" #include +#include #include #include +#include #include #include #include -#include #define CONF_DELIM_WITH_SPACE " \t\r\n" @@ -130,11 +133,11 @@ int load_conf(const char *conf_file) } else if (strcasecmp(p, "bbs_port") == 0) { - BBS_port = (in_port_t)atoi(q); + BBS_port[0] = (in_port_t)atoi(q); } - else if (strcasecmp(p, "bbs_ssh") == 0) + else if (strcasecmp(p, "bbs_ssh_port") == 0) { - BBS_ssh_v2 = (strcasecmp(q, "v2") == 0 ? 1 : 0); + BBS_port[1] = (in_port_t)atoi(q); } else if (strcasecmp(p, "bbs_max_client") == 0) {