However, REG_NOERROR is not defined by musl, even GNU regex do not
mention REG_NOERROR, so just remove it to avoid the following build
failure:
src/netlink.c: In function 'check_ignorelist':
src/netlink.c:243:51: error: 'REG_NOERROR' undeclared (first use in this function); did you mean 'REG_NOTBOL'?
if (regexec(i->rdevice, dev, 0, NULL, 0) != REG_NOERROR)
^~~~~~~~~~~
REG_NOTBOL
```
src/snmp_agent.c:965:9: error: ‘strncat’ output may be truncated copying between 0 and 127 bytes from a string of length 127 [-Werror=stringop-truncation]
strncat(out, str, DATA_MAX_NAME_LEN - strlen(out) - 1);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
```
"src/daemon/plugin.c", line 439: warning: assignment type mismatch:
pointer to function(void) returning void "=" pointer to void
"src/daemon/plugin.c", line 533: warning: assignment type mismatch:
pointer to function(void) returning int "=" pointer to void
"src/daemon/plugin.c", line 540: warning: assignment type mismatch:
pointer to function(pointer to struct user_data_s {pointer to void data, pointer to function(..) returning void free_func}) returning int "=" pointer to void
"src/daemon/plugin.c", line 1716: warning: assignment type mismatch:
pointer to function(void) returning int "=" pointer to void
"src/daemon/plugin.c", line 1784: warning: assignment type mismatch:
pointer to function(void) returning int "=" pointer to void
"src/daemon/plugin.c", line 1789: warning: assignment type mismatch:
pointer to function(pointer to struct user_data_s {pointer to void data, pointer to function(..) returning void free_func}) returning int "=" pointer to void
"src/daemon/plugin.c", line 1835: warning: assignment type mismatch:
pointer to function(pointer to const struct metric_family_s {pointer to char name, pointer to char help, enum {METRIC_TYPE_UNTYPED(2), METRIC_TYPE_GAUGE(1), METRIC_TYPE_COUNTER(0)} type, struct {..} metric}, pointer to struct user_data_s {pointer to void data, pointer to function(..) returning void free_func}) returning int "=" pointer to void
"src/daemon/plugin.c", line 1872: warning: assignment type mismatch:
pointer to function(pointer to const struct metric_family_s {pointer to char name, pointer to char help, enum {METRIC_TYPE_UNTYPED(2), METRIC_TYPE_GAUGE(1), METRIC_TYPE_COUNTER(0)} type, struct {..} metric}, pointer to struct user_data_s {pointer to void data, pointer to function(..) returning void free_func}) returning int "=" pointer to void
"src/daemon/plugin.c", line 1899: warning: assignment type mismatch:
pointer to function(unsigned long long, pointer to const char, pointer to struct user_data_s {pointer to void data, pointer to function(..) returning void free_func}) returning int "=" pointer to void
"src/daemon/plugin.c", line 1944: warning: assignment type mismatch:
pointer to function(void) returning int "=" pointer to void
"src/daemon/plugin.c", line 1986: warning: assignment type mismatch:
pointer to function(pointer to const struct metric_family_s {pointer to char name, pointer to char help, enum {METRIC_TYPE_UNTYPED(2), METRIC_TYPE_GAUGE(1), METRIC_TYPE_COUNTER(0)} type, struct {..} metric}, pointer to struct user_data_s {pointer to void data, pointer to function(..) returning void free_func}) returning int "=" pointer to void
"src/daemon/plugin.c", line 2342: warning: assignment type mismatch:
pointer to function(pointer to const struct notification_s {int severity, unsigned long long time, array[256] of char message, array[128] of char host, array[128] of char plugin, array[128] of char plugin_instance, array[128] of char type, array[128] of char type_instance, pointer to struct notification_meta_s {..} meta}, pointer to struct user_data_s {pointer to void data, pointer to function(..) returning void free_func}) returning int "=" pointer to void
"src/daemon/plugin.c", line 2382: warning: assignment type mismatch:
pointer to function(int, pointer to const char, pointer to struct user_data_s {pointer to void data, pointer to function(..) returning void free_func}) returning void "=" pointer to void
```
This commit will add the patch that fixes the memory leak in curl
plugin. Before when AddressFamily field was set in config file in
variable af was pointer to value of this field and it wasn't freed at
the end. Now this bug is fixed.
This commit will add the patch that fixes the memory leak in curl
plugin. Before when AddressFamily field was set in config file in
variable af was pointer to value of this field and it wasn't freed at
the end. Now this bug is fixed.
The empty 'f' case probably used to be wrapped in its own #if
COLLECT_DAEMON, but that apparently somehow got lost and gcc 9.3
complains about the duplicate case. Therefore, just wrap the
config->daemonize assignment into #if/#endif, like for the other cases.