As for the build log, I suppose most of the error noise about ups->conn as an int is because of C defaulting:
src/nut.c:40:2: error: #error "Unable to determine the UPS connection type."
40 | #error "Unable to determine the UPS connection type."
| ^~~~~
src/nut.c:46:3: error: unknown type name 'collectd_upsconn_t'
46 | collectd_upsconn_t *conn;
| ^~~~~~~~~~~~~~~~~~
further due to this:
checking upsclient.h usability... yes
checking upsclient.h presence... yes
checking for upsclient.h... yes
checking for upscli_connect in -lupsclient... yes
checking for upscli_init in -lupsclient... yes
checking for upscli_tryconnect in -lupsclient... yes
checking for UPSCONN_t... no
checking for UPSCONN... no
Not sure why configure decides the header is usable if it then fails to parse/use it, I suppose - if it does not find the UPSCONN_t as usable. But the code build does not seem to fail because of the header syntax (consumer C file includes time.h elsewhere in the chain before upsclient.h?) - e.g. it knows to expect struct <anonymous> * here:
In file included from src/nut.c:33:
/usr/lfs/hdd_v1/rc-buildroot-test/scripts/instance-1/output-1/host/i586-buildroot-linux-musl/sysroot/usr/include/upsclient.h:82:13: note: expected 'UPSCONN_t *' {aka 'struct <anonymous> *'} but argument is of type 'int *'
82 | const char *upscli_strerror(UPSCONN_t *ups);
| ^~~~~~~~~~~~~~
In fact, for that build log I do not see mention of time_t at all.
However some other changes to less loose data types, like uint16_t vs. earlier int for the port numbers may need to be fixed in the consumer codebase. At least that much of the change was "sort of" documented:
https://github.com/networkupstools/nut/blob/master/UPGRADING#L51-L59
Originally posted by @jimklimov in #1638 (comment)
further due to this:
Not sure why
configuredecides the header is usable if it then fails to parse/use it, I suppose - if it does not find theUPSCONN_tas usable. But the code build does not seem to fail because of the header syntax (consumer C file includestime.helsewhere in the chain beforeupsclient.h?) - e.g. it knows to expectstruct <anonymous> *here:In fact, for that build log I do not see mention of
time_tat all.However some other changes to less loose data types, like
uint16_tvs. earlierintfor the port numbers may need to be fixed in the consumer codebase. At least that much of the change was "sort of" documented:https://github.com/networkupstools/nut/blob/master/UPGRADING#L51-L59
Originally posted by @jimklimov in #1638 (comment)