!70 lwip适配内核posix接口

Merge pull request !70 from 刘建东/master
This commit is contained in:
openharmony_ci 2021-04-16 08:02:51 +08:00 committed by Gitee
commit a09d38a983
12 changed files with 10 additions and 18 deletions

View File

@ -44,7 +44,6 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include "securec.h" #include "securec.h"
#include "log.h"
#include "memory_pool.h" #include "memory_pool.h"
#ifdef htons #ifdef htons
@ -62,6 +61,7 @@
#define LWIP_DNS_API_DEFINE_ERRORS 0 #define LWIP_DNS_API_DEFINE_ERRORS 0
#define LWIP_DNS_API_DEFINE_FLAGS 0 #define LWIP_DNS_API_DEFINE_FLAGS 0
#define LWIP_DNS_API_DECLARE_STRUCTS 0 #define LWIP_DNS_API_DECLARE_STRUCTS 0
#define LWIP_DNS_API_DECLARE_H_ERRNO 0
#ifndef __SIZEOF_POINTER__ #ifndef __SIZEOF_POINTER__
#define __SIZEOF_POINTER__ 4 // 32 bit system #define __SIZEOF_POINTER__ 4 // 32 bit system

View File

@ -35,8 +35,4 @@
#include <netdb.h> #include <netdb.h>
#include_next <lwip/netdb.h> #include_next <lwip/netdb.h>
#ifdef h_errno
#undef h_errno
#endif
#endif /* _LWIP_PORTING_NETDB_H_ */ #endif /* _LWIP_PORTING_NETDB_H_ */

View File

@ -36,7 +36,6 @@
#include "lwip/sockets.h" #include "lwip/sockets.h"
#include <sys/socket.h> #include <sys/socket.h>
#include <arpa/inet.h> #include <arpa/inet.h>
#include "log.h"
#include "securec.h" #include "securec.h"
#ifdef __cplusplus #ifdef __cplusplus

View File

@ -38,7 +38,6 @@
#define TEST_CASE 120 #define TEST_CASE 120
static char g_buf[BUF_SIZE + 1] = { 0 }; static char g_buf[BUF_SIZE + 1] = { 0 };
extern sys_thread_t sys_thread_new(const char *name, lwip_thread_fn thread, void *arg, int stackSize, int prio);
void UdpTestTask(void *p) void UdpTestTask(void *p)
{ {

View File

@ -39,7 +39,6 @@
#define TEST_CASE 130 #define TEST_CASE 130
static char g_buf[BUF_SIZE + 1] = { 0 }; static char g_buf[BUF_SIZE + 1] = { 0 };
extern sys_thread_t sys_thread_new(const char *name, lwip_thread_fn thread, void *arg, int stackSize, int prio);
static int SampleTcpServer() static int SampleTcpServer()
{ {

View File

@ -40,7 +40,6 @@ static char g_buf_temp[BUF_SIZE + 1] = { 0 };
#define SEND_UDP_COUNT 10000 // send count #define SEND_UDP_COUNT 10000 // send count
#define TEST_CASE 170 #define TEST_CASE 170
extern sys_thread_t sys_thread_new(const char *name, lwip_thread_fn thread, void *arg, int stackSize, int prio);
static void UdpTestMoreTask(void *p) static void UdpTestMoreTask(void *p)
{ {
(void)p; (void)p;

View File

@ -41,8 +41,6 @@
static char g_serverSendBuf[BUF_SIZE + 1] = { 0 }; static char g_serverSendBuf[BUF_SIZE + 1] = { 0 };
static char g_clientRecvBuf[BUF_SIZE + 1] = { 0 }; static char g_clientRecvBuf[BUF_SIZE + 1] = { 0 };
extern sys_thread_t sys_thread_new(const char *name, lwip_thread_fn thread, void *arg, int stackSize, int prio);
static void InitMsgBuf() static void InitMsgBuf()
{ {
int i; int i;

View File

@ -43,8 +43,6 @@
static char g_buf[BUF_SIZE + 1] = { 0 }; static char g_buf[BUF_SIZE + 1] = { 0 };
extern sys_thread_t sys_thread_new(const char *name, lwip_thread_fn thread, void *arg, int stackSize, int prio);
static int SampleTcpServer() static int SampleTcpServer()
{ {
#if LWIP_SOCKET_SELECT #if LWIP_SOCKET_SELECT

View File

@ -43,8 +43,6 @@
#define TIME_OUT (1000 * 10) // timeout 10s #define TIME_OUT (1000 * 10) // timeout 10s
static char g_buf[BUF_SIZE + 1] = { 0 }; static char g_buf[BUF_SIZE + 1] = { 0 };
extern sys_thread_t sys_thread_new(const char *name, lwip_thread_fn thread, void *arg, int stackSize, int prio);
static int SampleTcpServer() static int SampleTcpServer()
{ {
#if LWIP_SOCKET_POLL #if LWIP_SOCKET_POLL

View File

@ -45,7 +45,6 @@ static int g_portClient = STACK_PORT_TCP_DUP_START;
static char g_bufServer[BUF_SIZE + 1] = { 0 }; static char g_bufServer[BUF_SIZE + 1] = { 0 };
static char g_bufClient[BUF_SIZE + 1] = { 0 }; static char g_bufClient[BUF_SIZE + 1] = { 0 };
extern sys_thread_t sys_thread_new(const char *name, lwip_thread_fn thread, void *arg, int stackSize, int prio);
static int SampleTcpServer() static int SampleTcpServer()
{ {

View File

@ -38,8 +38,6 @@
#define STACK_PORT_TCP_LONG 2231 #define STACK_PORT_TCP_LONG 2231
#define TCP_LONG_BUF_SIZE (2 * 1024) #define TCP_LONG_BUF_SIZE (2 * 1024)
extern sys_thread_t sys_thread_new(const char *name, lwip_thread_fn thread, void *arg, int stackSize, int prio);
static int SampleTcpServer() static int SampleTcpServer()
{ {
int sfd, lsfd; int sfd, lsfd;

View File

@ -0,0 +1,9 @@
#include <netdb.h>
#undef h_errno
int h_errno;
int *__h_errno_location(void)
{
return &h_errno;
}