mirror of
https://github.com/LIV2/WinUAE.git
synced 2025-12-06 00:12:52 +00:00
slirp: some additional minor changes
This commit is contained in:
parent
024508e7ae
commit
ed47c81f8c
@ -1,10 +0,0 @@
|
||||
#include <stdint.h>
|
||||
|
||||
typedef uint8_t u_int8_t;
|
||||
typedef uint16_t u_int16_t;
|
||||
typedef uint32_t u_int32_t;
|
||||
typedef uint64_t u_int64_t;
|
||||
|
||||
typedef u_int8_t uint8;
|
||||
typedef u_int16_t uint16;
|
||||
typedef u_int32_t uint32;
|
||||
@ -72,7 +72,7 @@ int cksum(struct mbuf *m, int len)
|
||||
/*
|
||||
* Force to even boundary.
|
||||
*/
|
||||
if ((1 & (long) w) && (mlen > 0)) {
|
||||
if ((1 & (uintptr_t) w) && (mlen > 0)) {
|
||||
REDUCE;
|
||||
sum <<= 8;
|
||||
s_util.c[0] = *(u_int8_t *)w;
|
||||
|
||||
@ -9,10 +9,6 @@ int inet_aton(const char *cp, struct in_addr *ia);
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int slirp_init(void);
|
||||
void slirp_cleanup(void);
|
||||
|
||||
@ -34,8 +30,4 @@ int slirp_add_exec(int do_pty, const char *args, int addr_low_byte,
|
||||
|
||||
extern char slirp_hostname[33];
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@ -12,7 +12,16 @@
|
||||
#include "slirp_config.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
# include <inttypes.h>
|
||||
# include <stdint.h>
|
||||
|
||||
typedef uint8_t u_int8_t;
|
||||
typedef uint16_t u_int16_t;
|
||||
typedef uint32_t u_int32_t;
|
||||
typedef uint64_t u_int64_t;
|
||||
|
||||
typedef u_int8_t uint8;
|
||||
typedef u_int16_t uint16;
|
||||
typedef u_int32_t uint32;
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define container_of(address, type, field) ((type *)( \
|
||||
@ -364,7 +373,7 @@ struct tcpcb *tcp_drop(struct tcpcb *tp, int err);
|
||||
#define MAX_MRU 16384
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32
|
||||
#ifndef _MSC_VER
|
||||
#define min(x,y) ((x) < (y) ? (x) : (y))
|
||||
#define max(x,y) ((x) > (y) ? (x) : (y))
|
||||
#endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user