[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] RE: qemu/slirp bootp.c bootp.h ip_icmp.h libslirp.h...
From: |
Ronald |
Subject: |
[Qemu-devel] RE: qemu/slirp bootp.c bootp.h ip_icmp.h libslirp.h... |
Date: |
Mon, 06 Jun 2005 03:02:07 +0200 |
User-agent: |
Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.) |
Le Sun, 05 Jun 2005 20:00:12 +0200, Andreas Bollhalder a écrit :
> Hello
>
> On my WinXP host, I get a compile error in "udp.c" with the current QEMU
> version from the CVS. I use MinGW and MSYS (1.0.10). I was able to compile
> all versions of QEMU before.
>
> Maybe, I'm too early and miss some updates which are on the way...
s_addr is already in use in winsock2.h
8< --
struct in_addr {
union {
struct { u_char s_b1,s_b2,s_b3,s_b4; } S_un_b;
struct { u_short s_w1,s_w2; } S_un_w;
u_long S_addr;
} S_un;
#define s_addr S_un.S_addr
#define s_host S_un.S_un_b.s_b2
#define s_net S_un.S_un_b.s_b1
#define s_imp S_un.S_un_w.s_w2
#define s_impno S_un.S_un_b.s_b4
#define s_lh S_un.S_un_b.s_b3
};
8< --
I can built if I change the name.
--- slirp/udp.c 2005-06-06 02:57:59.398260235 +0200
+++ slirp/udp.c.try 2005-06-06 02:57:45.200935620 +0200
@@ -425,7 +425,7 @@
uint32_t d_addr; // destination address
uint16_t s_family; // source family
uint16_t s_port; // source port
- uint32_t s_addr; // source address
+ uint32_t so_addr; // source address
uint32_t seqn; // sequence number
uint16_t message; // message
uint16_t data_type; // data type
@@ -617,7 +617,7 @@
return;
cu_head = mtod(m, struct cu_header *);
cu_head->s_port = addr.sin_port;
- cu_head->s_addr = our_addr.s_addr;
+ cu_head->so_addr = our_addr.s_addr;
}
return;
> Andreas
>
>
> gcc -Wall -O2 -g -fno-strict-aliasing -fomit-frame-pointer -I.
> -I/d/dev/QEMU/qemu/target-i386 -I/d/dev/QEMU/qemu -D_GNU_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/d/dev/QEMU/qemu/fpu
> -I/d/dev/QEMU/qemu/slirp -c -o slirp/udp.o /d/dev/QEMU/qemu/slirp/udp.c
> d:/dev/QEMU/qemu/slirp/udp.c: In function `udp_emu':
> d:/dev/QEMU/qemu/slirp/udp.c:428: warning: no semicolon at end of struct
> or union
> d:/dev/QEMU/qemu/slirp/udp.c:428: parse error before '.' token
> d:/dev/QEMU/qemu/slirp/udp.c:405: warning: unused variable `addrlen'
> d:/dev/QEMU/qemu/slirp/udp.c:429: warning: unused variable `seqn'
> d:/dev/QEMU/qemu/slirp/udp.c:430: warning: unused variable `message'
> d:/dev/QEMU/qemu/slirp/udp.c:431: warning: unused variable `data_type'
> d:/dev/QEMU/qemu/slirp/udp.c:432: warning: unused variable `pkt_len'
> d:/dev/QEMU/qemu/slirp/udp.c: At top level:
> d:/dev/QEMU/qemu/slirp/udp.c:433: warning: type defaults to `int' in
> declaration of `cu_head'
> d:/dev/QEMU/qemu/slirp/udp.c:433: warning: data definition has no type or
> storage class
> d:/dev/QEMU/qemu/slirp/udp.c:435: parse error before "switch"
> d:/dev/QEMU/qemu/slirp/udp.c:618: warning: type defaults to `int' in
> declaration of `cu_head'
> d:/dev/QEMU/qemu/slirp/udp.c:618: conflicting types for `cu_head'
> d:/dev/QEMU/qemu/slirp/udp.c:433: previous declaration of `cu_head'
> d:/dev/QEMU/qemu/slirp/udp.c:618: `m' undeclared here (not in a function)
> d:/dev/QEMU/qemu/slirp/udp.c:618: warning: data definition has no type or
> storage class
> d:/dev/QEMU/qemu/slirp/udp.c:619: parse error before '->' token make: ***
> [slirp/udp.o] Error 1
>