libressl / portable

LibreSSL Portable itself. This includes the build scaffold and compatibility layer that builds portable LibreSSL from the OpenBSD source code. Pull requests or patches sent to tech@openbsd.org are welcome.
https://www.libressl.org
1.35k stars 269 forks source link

`compat/stdint.h` missing from source tarball #1064

Closed vszakats closed 4 months ago

vszakats commented 4 months ago

While skimming commits I noticed that the codebase does actually tackle the case where OpenBSD-specific __bound__ attribute is not supported by the compiler. The logic was moved to compat/stdint.h in 3a757272d028834c00924c08156ca0b2dfbc6a5c (2023-07-05), but this header is missing from the tarball as of v3.9.2.

Would the presence of this header fix the GCC compiler warnings in chacha-merged.c mentioned here?: https://github.com/libressl/portable/issues/910#issuecomment-1755219504

If so, I wonder if it'd be a good idea to add it to the tarball, ~~but could not figure out the script responsible for this~~.

botovq commented 4 months ago

I've neutered that with a bigger hammer: https://github.com/openbsd/src/commit/65010fa90cde4d3844c77cb00c51b2485f66de52

vszakats commented 4 months ago

Perhaps this?:

diff --git a/include/Makefile.am b/include/Makefile.am
index 22819c8..feaaa60 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -17,6 +17,7 @@ noinst_HEADERS += compat/poll.h
 noinst_HEADERS += compat/pthread.h
 noinst_HEADERS += compat/readpassphrase.h
 noinst_HEADERS += compat/resolv.h
+noinst_HEADERS += compat/stdint.h
 noinst_HEADERS += compat/stdio.h
 noinst_HEADERS += compat/stdlib.h
 noinst_HEADERS += compat/string.h
vszakats commented 4 months ago

I've neutered that with a bigger hammer: openbsd/src@65010fa

Ah, nice, thanks!

That said compat/stdint.h has some other things in it as well. If there, it might make sense distributing?

botovq commented 4 months ago

On Wed, Jun 05, 2024 at 11:48:11AM -0700, Viktor Szakats wrote:

Perhaps this?:

Yes, that's it. Care to make this a PR?

vszakats commented 4 months ago

There it is: #1065

botovq commented 4 months ago

Thanks. And this should indeed fix this warning. I'll double check and revert the hack in chacha-merged.c

busterb commented 4 months ago

Hmm, this file has been here for 6 years and never made an appearance in the distributed tarballs. Darn, sorry about that.