Skip to content

Commit

Permalink
Merge pull request #1095 from Dennisbonke/vlc
Browse files Browse the repository at this point in the history
  • Loading branch information
no92 authored Aug 14, 2024
2 parents a14a7c8 + 380fef5 commit f3e45ca
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions abis/linux/in.h
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ struct group_source_req {
#define IP_PMTUDISC_INTERFACE 4
#define IP_PMTUDISC_OMIT 5

#define MCAST_JOIN_GROUP 42
#define MCAST_BLOCK_SOURCE 43
#define MCAST_UNBLOCK_SOURCE 44
#define MCAST_JOIN_SOURCE_GROUP 46
Expand Down
2 changes: 2 additions & 0 deletions options/ansi/include/inttypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@
#define SCNd32 "d"
#define SCNd64 __PRI64 "d"

#define SCNu16 "hu"

#endif /* !__MLIBC_ABI_ONLY */

#ifdef __cplusplus
Expand Down
5 changes: 5 additions & 0 deletions options/posix/generic/posix_stdio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,11 @@ char *fgetln(FILE *, size_t *) {
__builtin_unreachable();
}

char *tempnam(const char *, const char *) {
__ensure(!"Not implemented");
__builtin_unreachable();
}

FILE *fopencookie(void *cookie, const char *__restrict mode, cookie_io_functions_t funcs) {
int flags = mlibc::fd_file::parse_modestring(mode);

Expand Down
5 changes: 5 additions & 0 deletions options/posix/generic/posix_string.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,11 @@ void *memrchr(const void *m, int c, size_t n) {
return 0;
}

char *strerror_l(int errnum, locale_t) {
mlibc::infoLogger() << "mlibc: strerror_l locale is ignored!" << frg::endlog;
return strerror(errnum);
}

// BSD extensions.
// Taken from musl
size_t strlcpy(char *d, const char *s, size_t n) {
Expand Down
2 changes: 2 additions & 0 deletions options/posix/include/bits/posix/posix_stdio.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ int vdprintf(int fd, const char *format, __builtin_va_list args);

char *fgetln(FILE *, size_t *);

char *tempnam(const char *dir, const char *pfx);

#endif /* !__MLIBC_ABI_ONLY */

#define RENAME_EXCHANGE (1 << 1)
Expand Down
2 changes: 2 additions & 0 deletions options/posix/include/bits/posix/posix_string.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ void *memccpy(void *__restrict dest, const void *__restrict src, int c, size_t n

int strcoll_l(const char *s1, const char *s2, locale_t locale);

char *strerror_l(int errnum, locale_t locale);

// GNU extensions.
#if defined(_GNU_SOURCE)
char *strcasestr(const char *, const char *);
Expand Down
3 changes: 3 additions & 0 deletions sysdeps/managarm/generic/socket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,9 @@ int sys_setsockopt(int fd, int layer, int number,
}else if(layer == SOL_SOCKET && number == SO_OOBINLINE) {
mlibc::infoLogger() << "\e[31mmlibc: setsockopt() call with SOL_SOCKET and SO_OOBINLINE is unimplemented\e[39m" << frg::endlog;
return 0;
}else if(layer == SOL_SOCKET && number == SO_PRIORITY) {
mlibc::infoLogger() << "\e[31mmlibc: setsockopt() call with SOL_SOCKET and SO_PRIORITY is unimplemented\e[39m" << frg::endlog;
return 0;
}else{
mlibc::panicLogger() << "\e[31mmlibc: Unexpected setsockopt() call, layer: " << layer << " number: " << number << "\e[39m" << frg::endlog;
__builtin_unreachable();
Expand Down

0 comments on commit f3e45ca

Please sign in to comment.