Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
11f7b5ba
Commit
11f7b5ba
authored
Aug 31, 2009
by
Francois Gouget
Committed by
Alexandre Julliard
Aug 31, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iphlpapi: Fix compilation on systems that don't support nameless structs or unions.
parent
891d3ef5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
iphlpapi_main.c
dlls/iphlpapi/iphlpapi_main.c
+7
-5
No files found.
dlls/iphlpapi/iphlpapi_main.c
View file @
11f7b5ba
...
...
@@ -42,6 +42,8 @@
# include <resolv.h>
#endif
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
#include "windef.h"
#include "winbase.h"
#include "winreg.h"
...
...
@@ -653,8 +655,8 @@ static ULONG adapterAddressesFromIndex(DWORD index, IP_ADAPTER_ADDRESSES *aa, UL
DWORD
buflen
,
type
,
status
;
memset
(
aa
,
0
,
sizeof
(
IP_ADAPTER_ADDRESSES
));
aa
->
Length
=
sizeof
(
IP_ADAPTER_ADDRESSES
);
aa
->
IfIndex
=
index
;
aa
->
u
.
s
.
Length
=
sizeof
(
IP_ADAPTER_ADDRESSES
);
aa
->
u
.
s
.
IfIndex
=
index
;
getInterfaceNameByIndex
(
index
,
name
);
memcpy
(
ptr
,
name
,
IF_NAMESIZE
);
...
...
@@ -675,16 +677,16 @@ static ULONG adapterAddressesFromIndex(DWORD index, IP_ADAPTER_ADDRESSES *aa, UL
for
(
i
=
0
;
i
<
num_addrs
;
i
++
)
{
memset
(
ua
,
0
,
sizeof
(
IP_ADAPTER_UNICAST_ADDRESS
));
ua
->
Length
=
sizeof
(
IP_ADAPTER_UNICAST_ADDRESS
);
ua
->
u
.
s
.
Length
=
sizeof
(
IP_ADAPTER_UNICAST_ADDRESS
);
ua
->
Address
.
iSockaddrLength
=
sizeof
(
struct
sockaddr_in
);
ua
->
Address
.
lpSockaddr
=
(
SOCKADDR
*
)((
char
*
)
ua
+
ua
->
Length
);
ua
->
Address
.
lpSockaddr
=
(
SOCKADDR
*
)((
char
*
)
ua
+
ua
->
u
.
s
.
Length
);
sa
=
(
struct
sockaddr_in
*
)
ua
->
Address
.
lpSockaddr
;
sa
->
sin_family
=
AF_INET
;
sa
->
sin_addr
.
s_addr
=
addrs
[
i
];
sa
->
sin_port
=
0
;
ptr
+=
ua
->
Length
+
ua
->
Address
.
iSockaddrLength
;
ptr
+=
ua
->
u
.
s
.
Length
+
ua
->
Address
.
iSockaddrLength
;
if
(
i
<
num_addrs
-
1
)
{
ua
->
Next
=
(
IP_ADAPTER_UNICAST_ADDRESS
*
)
ptr
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment