The display variable is declared in a header with no explicit linkage.
This results in there being multiple definitions of it in wmbiff.o and
libwmgeneral.a and a failure during linking with gcc 10.
Add `extern` to the header declaration and a separate declaration with no
linkage in wmgeneral.c where it is assigned.
Link: https://bugs.debian.org/957937
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
I received the following patch from Tilmann Hentze <0xcafe@directbox.com>
in an email:
> Hello,
> there are processes, that have space characters in their names, for example
> Firefoxe's "Web Content" process.
> The current sscanf line for Linux would only considers the first part of
> the process name, e.g. "Web" and cut off the rest.
> Attached patch should consider the complete process name between parentheses.
> Further I did not touch the handling of removal of "kdeinit", since
> I am not using KDE and am not sure if the assumptions in the source code
> are still valid.
> Best Regards,
> Tilmann.
Signed-off-by: Doug Torrance <dtorrance@piedmont.edu>
In `cmd_crit`, if there is an allocation failure, we return from the
function immediately and leak any previously allocated memory. Go to
the clean-up code at the end of the function instead.
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
By default, upower is enabled and hal is disabled.
Fixes: 7434685dae ("wmbattery: use PKG_CHECK_MODULES, rather than calling pkg-config explicitly.")
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
If there is no config-file in $HOME, use a default parameter value
instead of complaining and exiting.
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
From Debian bug #917993:
From: Nye Liu <nyet@nyet.org>
Subject: wmbiff: gmail (and many other IMAP servers) now require SNI
Date: Tue, 01 Jan 2019 18:33:51 -0800
wmbiff/gmail imap4: Need new connection to ***@gmail.com@imap.gmail.com
wmbiff/gmail comm: certificate passed time check.
wmbiff/gmail comm: server's certificate (OU=No SNI provided\; please fix your client.,CN=invalid2.invalid) does not match its hostname (imap.gmail.com).
wmbiff/gmail comm: server's certificate does not match its hostname.
wmbiff/gmail comm: to ignore this error, run wmbiff with the -skip-certificate-check option
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
`regulo_atoi` expects a pointer-to-int and `PCU.serverPort` is a
`uint16_t`, so `&PCU.serverPort` is not compatible and we need to use an
`int` temporary variable to avoid endianness problems.
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
`addr.sin_addr.s_addr` is a `uint32_t` in NBO, so assigning a
`struct in_addr` cast to `unsigned long` will break on 64-bit big-endian
architectures.
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>