mirror of
https://gitlab.freedesktop.org/libbsd/libbsd.git
synced 2025-10-14 23:08:00 +02:00
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:
@@ -44,8 +44,10 @@
|
||||
__BEGIN_DECLS
|
||||
int
|
||||
gid_from_group(const char *, gid_t *);
|
||||
#ifndef __APPLE__
|
||||
const char *
|
||||
group_from_gid(gid_t, int);
|
||||
#endif
|
||||
__END_DECLS
|
||||
|
||||
#endif
|
||||
|
@@ -44,8 +44,10 @@
|
||||
__BEGIN_DECLS
|
||||
int
|
||||
uid_from_user(const char *, uid_t *);
|
||||
#ifndef __APPLE__
|
||||
const char *
|
||||
user_from_uid(uid_t, int);
|
||||
#endif
|
||||
__END_DECLS
|
||||
|
||||
#endif
|
||||
|
@@ -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);
|
||||
|
||||
|
@@ -41,10 +41,14 @@
|
||||
#include <sys/types.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
#ifndef __APPLE__
|
||||
size_t strlcpy(char *dst, const char *src, size_t siz);
|
||||
size_t strlcat(char *dst, const char *src, size_t siz);
|
||||
#endif
|
||||
char *strnstr(const char *str, const char *find, size_t str_len);
|
||||
#ifndef __APPLE__
|
||||
void strmode(mode_t mode, char *str);
|
||||
#endif
|
||||
|
||||
#if !defined(__GLIBC__) || \
|
||||
!__GLIBC_PREREQ(2, 25) || \
|
||||
|
Reference in New Issue
Block a user