Go to file
Viktor Szakats 7925ba431b
rand: fix build error with autotools + LibreSSL
autotools unexpectedly detects `arc4random` because it is also looking
into dependency libs. One dependency, LibreSSL, happens to publish an
`arc4random` function (via its shared lib before v3.7, also via static
lib as of v3.8.2). When trying to use this function in `lib/rand.c`,
its protoype is missing. To fix that, curl included a prototype, but
that used a C99 type without including `stdint.h`, causing:

```
../../lib/rand.c:37:1: error: unknown type name 'uint32_t'
   37 | uint32_t arc4random(void);
      | ^
1 error generated.
```

This patch improves this by dropping the local prototype and instead
limiting `arc4random` use for non-OpenSSL builds. OpenSSL builds provide
their own random source anyway.

The better fix would be to teach autotools to not link dependency libs
while detecting `arc4random`.

LibreSSL publishing a non-namespaced `arc4random` tracked here:
https://github.com/libressl/portable/issues/928

Regression from 755ddbe901 #10672

Reviewed-by: Daniel Stenberg
Fixes #12257
Closes #12274
2023-11-06 10:11:56 +00:00
.circleci
.github GHA: fix checkout of quictls repository to use correct branch name 2023-10-30 16:58:45 +01:00
.reuse
CMake build: require Windows XP or newer 2023-10-30 10:46:40 +00:00
docs docs: KNOWN_BUGS cleanup 2023-11-05 10:39:32 +01:00
include RELEASE-NOTES: synced 2023-10-22 10:58:08 +02:00
lib rand: fix build error with autotools + LibreSSL 2023-11-06 10:11:56 +00:00
LICENSES
m4 cmake: pre-fill rest of detection values for Windows 2023-10-24 21:06:36 +00:00
packages spelling: fix codespell 2.2.6 typos 2023-10-03 21:37:56 +00:00
plan9
projects
scripts autotools: update references to deleted crypt-auth option 2023-10-25 12:45:43 +00:00
src curl: improved IPFS and IPNS URL support 2023-11-05 10:59:20 +01:00
tests curl: improved IPFS and IPNS URL support 2023-11-05 10:59:20 +01:00
winbuild build: do not publish HAVE_BORINGSSL, HAVE_AWSLC macros 2023-10-08 22:29:45 +00:00
.azure-pipelines.yml CI: move distcheck job from Azure Pipelines to GitHub Actions 2023-10-08 19:36:16 +02:00
.cirrus.yml CI: bump OpenLDAP package version on FreeBSD 2023-10-07 12:52:07 -07:00
.dcignore
.dir-locals.el
.git-blame-ignore-revs
.gitattributes
.gitignore
.mailmap
acinclude.m4 build: variadic macro tidy-ups 2023-10-27 00:37:34 +00:00
appveyor.yml appveyor: make VS2008-built curl tool runnable 2023-11-03 22:53:45 +00:00
buildconf
buildconf.bat
CHANGES
CMakeLists.txt build: require Windows XP or newer 2023-10-30 10:46:40 +00:00
configure.ac HTTP3: ngtcp2 builds are no longer experimental 2023-10-31 14:31:46 +01:00
COPYING
curl-config.in
GIT-INFO
libcurl.def
libcurl.pc.in
MacOSX-Framework
Makefile.am
Makefile.dist
maketgz
README
README.md
RELEASE-NOTES RELEASE-NOTES: synced 2023-11-05 23:28:45 +01:00
SECURITY.md

curl logo

Curl is a command-line tool for transferring data specified with URL syntax. Find out how to use curl by reading the curl.1 man page or the MANUAL document. Find out how to install Curl by reading the INSTALL document.

libcurl is the library curl is using to do its job. It is readily available to be used by your software. Read the libcurl.3 man page to learn how.

You can find answers to the most frequent questions we get in the FAQ document.

Study the COPYING file for distribution terms.

Contact

If you have problems, questions, ideas or suggestions, please contact us by posting to a suitable mailing list.

All contributors to the project are listed in the THANKS document.

Commercial support

For commercial support, maybe private and dedicated help with your problems or applications using (lib)curl visit the support page.

Website

Visit the curl website for the latest news and downloads.

Git

To download the latest source from the Git server, do this:

git clone https://github.com/curl/curl.git

(you will get a directory named curl created, filled with the source code)

Security problems

Report suspected security problems via our HackerOne page and not in public.

Notice

Curl contains pieces of source code that is Copyright (c) 1998, 1999 Kungliga Tekniska Högskolan. This notice is included here to comply with the distribution terms.

Backers

Thank you to all our backers! 🙏 Become a backer.

Sponsors

Support this project by becoming a sponsor.