janmojzis / tinyssh

TinySSH is small server (less than 100000 words of code)
Creative Commons Zero v1.0 Universal
1.44k stars 79 forks source link

sysdep/hasutmp{,x}addrv6.h-yes.c update test #69

Closed janmojzis closed 2 years ago

janmojzis commented 2 years ago

detects if 'struct utmp{,x}' has '.ut_addr_v6' in compilation phase

janmojzis commented 2 years ago

I've updated the test. Now it should work in cross-compilation.

Can You please @skarnet independently check this change?

skarnet commented 2 years ago

Works for me in a native build. However, I don't have the time today to understand your cross-compilation scripts and set up a cross-build. I can try on Monday, but your change looks good to me and you can probably merge to master.

What I would really like is a way to force a sysdep to no (and also yes, if it's easily doable) without having to edit sysdep/list to comment the sysdeps I don't want.

My use case is that I want to build tinyssh against utmps, which is an implementation of utmpx; but the musl libc also provides a stub implementation of utmp, which I don't want to use, so I need to force the hasutmp sysdep (and related ones) to no, else my build fails. I'm currently doing it by editing sysdep/list but that's a hack and not easy to automate.