mlibc: stub getsockopt

This commit is contained in:
Matheus
2024-06-03 22:46:02 -03:00
parent 83c6c2a120
commit aa7d58612e
+8 -2
View File
@@ -236,10 +236,10 @@ index 0000000..e5b087a
+ +
diff --git mlibc-workdir/sysdeps/astral/generic/generic.cpp mlibc-workdir/sysdeps/astral/generic/generic.cpp diff --git mlibc-workdir/sysdeps/astral/generic/generic.cpp mlibc-workdir/sysdeps/astral/generic/generic.cpp
new file mode 100644 new file mode 100644
index 0000000..b150712 index 0000000..31b763b
--- /dev/null --- /dev/null
+++ mlibc-workdir/sysdeps/astral/generic/generic.cpp +++ mlibc-workdir/sysdeps/astral/generic/generic.cpp
@@ -0,0 +1,724 @@ @@ -0,0 +1,730 @@
+#include <bits/ensure.h> +#include <bits/ensure.h>
+#include <mlibc/debug.hpp> +#include <mlibc/debug.hpp>
+#include <mlibc/all-sysdeps.hpp> +#include <mlibc/all-sysdeps.hpp>
@@ -323,6 +323,12 @@ index 0000000..b150712
+ return 0; + return 0;
+ } + }
+ +
+ int sys_getsockopt(int fd, int layer, int number,
+ void *__restrict buffer, socklen_t *__restrict size) {
+ mlibc::infoLogger() << "getsockopt: " << fd << " " << layer << " " << number << frg::endlog;
+ return 0;
+ }
+
+ int sys_getitimer(int which, struct itimerval *curr_value) { + int sys_getitimer(int which, struct itimerval *curr_value) {
+ long ret; + long ret;
+ return syscall(SYSCALL_SETITIMER, &ret, which, (uint64_t)curr_value); + return syscall(SYSCALL_SETITIMER, &ret, which, (uint64_t)curr_value);