contrib: fixed c++ compatibility of unix port

This commit is contained in:
Sebastian Michel
2024-01-04 08:31:28 +01:00
committed by goldsimon
parent 347054b329
commit e1b8080346
9 changed files with 72 additions and 0 deletions

View File

@@ -52,6 +52,10 @@
#define LWIP_TIMEVAL_PRIVATE 0
#include <sys/time.h>
#ifdef __cplusplus
extern "C" {
#endif
#define LWIP_ERRNO_INCLUDE <errno.h>
#if defined(LWIP_UNIX_LINUX) || defined(LWIP_UNIX_HURD) || defined(LWIP_UNIX_KFREEBSD)
@@ -86,4 +90,8 @@ typedef struct sio_status_s sio_status_t;
typedef unsigned int sys_prot_t;
#ifdef __cplusplus
}
#endif
#endif /* LWIP_ARCH_CC_H */

View File

@@ -34,6 +34,10 @@
#include <sys/times.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifdef PERF
#define PERF_START { \
unsigned long __c1l, __c1h, __c2l, __c2h; \
@@ -60,4 +64,8 @@ void perf_print_times(struct tms *start, struct tms *end, char *key);
void perf_init(char *fname);
#ifdef __cplusplus
}
#endif
#endif /* LWIP_ARCH_PERF_H */

View File

@@ -32,6 +32,10 @@
#ifndef LWIP_ARCH_SYS_ARCH_H
#define LWIP_ARCH_SYS_ARCH_H
#ifdef __cplusplus
extern "C" {
#endif
#define SYS_MBOX_NULL NULL
#define SYS_SEM_NULL NULL
@@ -87,4 +91,8 @@ void sys_unlock_tcpip_core(void);
#define UNLOCK_TCPIP_CORE() sys_unlock_tcpip_core()
#endif
#ifdef __cplusplus
}
#endif
#endif /* LWIP_ARCH_SYS_ARCH_H */