Regression in OpenBSD

Fred Wright fw at fwright.net
Fri Dec 22 05:47:43 UTC 2023


On Thu, 21 Dec 2023, Fred Wright via devel wrote:

> I found one build error that's a regression - in OpenBSD 5.6.  It's 
> "'CMAC_CTX' undeclared" in authreadkeys.c, which is due to the new 
> conditional around the inclusion of <openssl/cmac.h>.  Some other sources 
> include this unconditionally, and macencrypt.c has it in an if/else 
> construct.  The else case there would be implicitly <= 0x20000000L, while the 
> condition here is < 0x20000000L.  That seemed like a hint, so I tried 
> changing the "<" to "<=" (line 26 of authreadkeys.c), and that fixed it. That 
> suggests that other cases of "< 0x20000000L" may incorrect as well. Perhaps 
> this OpenBSD install is the only case where the value of 
> OPENSSL_VERSION_NUMBER == 0x20000000L.

I forgot to mention that fixing this turned up a couple of additional 
warnings:

[ 58/121] Compiling ntpd/ntp_control.c
../../ntpd/ntp_control.c: In function 'process_control':
../../ntpd/ntp_control.c:794: warning: ignoring alignment for stack 
allocated 'pkt_core'
../../ntpd/ntp_control.c: In function 'read_ordlist':
../../ntpd/ntp_control.c:3545: warning: ignoring alignment for stack 
allocated 'pkt_core'

[101/121] Compiling build/host/ntpd/ntp_parser.tab.c
ntp_parser.tab.c:555:6: warning: "YYENABLE_NLS" is not defined
ntp_parser.tab.c:1481:6: warning: "YYLTYPE_IS_TRIVIAL" is not defined

And a couple that are typical OpenBSD pedantry:

[103/121] Linking build/main/ntpd/ntpd
ntpd/ntp_packetstamp.c.17.o(.text+0x11a): In function `fetch_packetstamp':
../../ntpd/ntp_packetstamp.c:178: warning: random() isn't random; consider 
using arc4random()

[147/237] Linking build/main/tests/test_libntp
tests/libntp/ntp_random.c.2.o(.text+0x1f4): In function 
`TEST_random_random32_':
../../tests/libntp/ntp_random.c:27: warning: random() isn't random; 
consider using arc4random()

> Ntpsec doesn't fully support OpenBSD anyway, due to the lack of "timex" 
> (though my Mac patches fix that), and the fact that OpenBSD provides LibreSSL 
> rather than OpenSSL, but the 1.2.2a "Mac" version did build with 
> --disable-nts.
>
> NetBSD 6.1.5 also fails due to a missing declaration for ldexpl, but that's 
> not a new problem.

Fred Wright


More information about the devel mailing list