mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-29 17:22:56 +08:00
add platform_h for socket.c
This commit is contained in:
parent
127919697d
commit
3d97469e25
@ -2,9 +2,10 @@
|
||||
#include "_socket_socket.h"
|
||||
#ifdef __linux__
|
||||
#include <arpa/inet.h>
|
||||
#include <netinet/in.h>
|
||||
#include <sys/socket.h>
|
||||
#include <unistd.h>
|
||||
#else
|
||||
/* you need to implement this for your platform */
|
||||
#include "__platform_socket.h"
|
||||
#endif
|
||||
|
||||
PIKA_WEAK int __platform_socket(int __domain, int __type, int __protocol) {
|
||||
|
3
port/linux/.vscode/settings.json
vendored
3
port/linux/.vscode/settings.json
vendored
@ -14,6 +14,7 @@
|
||||
"types.h": "c",
|
||||
"_socket.h": "c",
|
||||
"random.h": "c",
|
||||
"cstdlib": "c"
|
||||
"cstdlib": "c",
|
||||
"inet.h": "c"
|
||||
}
|
||||
}
|
@ -2,9 +2,10 @@
|
||||
#include "_socket_socket.h"
|
||||
#ifdef __linux__
|
||||
#include <arpa/inet.h>
|
||||
#include <netinet/in.h>
|
||||
#include <sys/socket.h>
|
||||
#include <unistd.h>
|
||||
#else
|
||||
/* you need to implement this for your platform */
|
||||
#include "__platform_socket.h"
|
||||
#endif
|
||||
|
||||
PIKA_WEAK int __platform_socket(int __domain, int __type, int __protocol) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user