build: On macOS do not build functions provided by the system

We have never built before on macOS, so we can exclude all the functions
that are currently provided in the system.

Closes: #1
Closes: !3
This commit is contained in:
Guillem Jover
2023-04-04 23:59:05 +02:00
parent bc65806ce2
commit 21d12b0211
11 changed files with 177 additions and 36 deletions

View File

@@ -51,6 +51,7 @@
#include <stdint.h>
__BEGIN_DECLS
#if !defined(__APPLE__)
#if !defined(__GLIBC__) || \
!__GLIBC_PREREQ(2, 36) || \
!defined(_DEFAULT_SOURCE)
@@ -60,6 +61,7 @@ uint32_t arc4random_uniform(uint32_t upper_bound);
#endif
void arc4random_stir(void);
void arc4random_addrandom(unsigned char *dat, int datlen);
#endif
int dehumanize_number(const char *str, int64_t *size);