On Mar 30 14:02, Jeremy Drake via Cygwin wrote:
> On Sun, 30 Mar 2025, Jeremy Drake via Cygwin wrote:
> 
> > I tried to build cmake 4.0.0 with latest test gcc and cygwin packages, and
> > got the following error
> >
> > /home/WDAGUtilityAccount/cmake-4.0.0/Utilities/cmcurl/lib/rand.c: In
> > function ‘weak_random’:
> > /home/WDAGUtilityAccount/cmake-4.0.0/Utilities/cmcurl/lib/rand.c:124:21:
> > error: implicit declaration of function ‘arc4random’; did you mean
> > ‘srandom’? [-Wimplicit-function-declaration]
> >   124 |   r = (unsigned int)arc4random();
> >       |                     ^~~~~~~~~~
> >       |                     srandom
> > make[2]: *** [Utilities/cmcurl/lib/CMakeFiles/cmcurl.dir/build.make:1423:
> > Utilities/cmcurl/lib/CMakeFiles/cmcurl.dir/rand.c.o] Error 1
> > make[2]: *** Waiting for unfinished jobs....
> 
> I kind of think
> https://github.com/Kitware/CMake/blob/5978c57c20b762a5aeb4b00f31a51a090d670430/Utilities/cmcurl/CMakeLists.txt#L165
> should match "^(Linux|Cygwin)$"...  Otherwise it doesn't get __BSD_VISIBLE
> and
> arc4random is not defined in the header (it looks for arc4random *symbol*
> on
> https://github.com/Kitware/CMake/blob/5978c57c20b762a5aeb4b00f31a51a090d670430/Utilities/cmcurl/CMakeLists.txt#L1982

Sounds right.  It makes sense to define _GNU_SOURCE, probably.


Corinna

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

Reply via email to