mirror of
https://github.com/zlib-ng/minizip-ng
synced 2026-08-25 14:26:08 -04:00
build with libbsd-overlay
Simplifies the code. Upstream also recommends it. Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
7b2784110f
commit
387ade34c6
2 changed files with 2 additions and 6 deletions
|
|
@ -527,7 +527,7 @@ if(UNIX)
|
|||
if(MZ_LIBBSD AND NOT HAVE_ARC4RANDOM_BUF)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
|
||||
pkg_check_modules(LIBBSD libbsd)
|
||||
pkg_check_modules(LIBBSD libbsd-overlay)
|
||||
if(LIBBSD_FOUND)
|
||||
check_library_exists("${LIBBSD_LIBRARIES}" "arc4random_buf"
|
||||
"${LIBBSD_LIBRARY_DIRS}" HAVE_LIBBSD_ARC4RANDOM_BUF)
|
||||
|
|
|
|||
|
|
@ -34,11 +34,7 @@
|
|||
# include <sys/random.h>
|
||||
#endif
|
||||
#if defined(HAVE_LIBBSD)
|
||||
# include <sys/types.h>
|
||||
# ifndef __u_char_defined
|
||||
typedef unsigned char u_char;
|
||||
# endif
|
||||
# include <bsd/stdlib.h> /* arc4random_buf */
|
||||
# include <stdlib.h> /* arc4random_buf */
|
||||
#endif
|
||||
|
||||
/***************************************************************************/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue