We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f7bc088 commit 36ea2bcCopy full SHA for 36ea2bc
2 files changed
libogc/CMakeLists.txt
@@ -19,6 +19,7 @@ add_library(ogc STATIC
19
ogc_sockets/soc_accept.c
20
ogc_sockets/soc_poll.c
21
ogc_sockets/soc_getsockname.c
22
+ ogc_sockets/soc_fcntl.c
23
24
console.c
25
lwp_queue.c
libogc/ogc_sockets/soc_fcntl.c
@@ -0,0 +1,25 @@
1
+#include "soc_common.h"
2
+#include <errno.h>
3
+#include <fcntl.h>
4
+#include <stdarg.h>
5
+
6
+int fcntl(int sockfd, int cmd, ...)
7
+{
8
9
+ int arg = 0;
10
11
+ sockfd = soc_get_fd(sockfd);
12
+ if(sockfd < 0) {
13
+ errno = -sockfd;
14
+ return -1;
15
+ }
16
17
+ va_list args;
18
+ if(cmd == F_SETFL) {
+ va_start(args, cmd);
+ arg = va_arg(args, int);
+ va_end(args);
+ return net_fcntl(sockfd, cmd, arg);
+}
0 commit comments