libc: Implement functions used by libdrm
This commit is contained in:
parent
b91a4124cc
commit
a4f646d694
|
@ -89,6 +89,8 @@
|
|||
#define PRIxPTR "lx"
|
||||
#define PRIXPTR "lX"
|
||||
|
||||
#define SCNu64 "lu"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
|
@ -115,6 +115,9 @@ int getchar_unlocked(void);
|
|||
int putc_unlocked(int, FILE *);
|
||||
int putchar_unlocked(int);
|
||||
|
||||
// GLIBC extensions.
|
||||
int asprintf(char **, const char *, ...);
|
||||
|
||||
// Linux unlocked I/O extensions.
|
||||
|
||||
void clearerr_unlocked(FILE *);
|
||||
|
|
|
@ -278,6 +278,12 @@ int putchar_unlocked(int) {
|
|||
__builtin_unreachable();
|
||||
}
|
||||
|
||||
// GLIBC extensions.
|
||||
int asprintf(char **, const char *, ...) {
|
||||
__ensure(!"Not implemented");
|
||||
__builtin_unreachable();
|
||||
}
|
||||
|
||||
// Linux unlocked I/O extensions.
|
||||
|
||||
void clearerr_unlocked(FILE *) {
|
||||
|
|
|
@ -7,6 +7,7 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
char *strdup(const char *string);
|
||||
char *strndup(const char *, size_t);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -13,3 +13,8 @@ char *strdup(const char *string) {
|
|||
return new_string;
|
||||
}
|
||||
|
||||
char *strndup(const char *string, size_t) {
|
||||
__ensure(!"Not implemented");
|
||||
__builtin_unreachable();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue