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
719c3a84
Commit
719c3a84
authored
Dec 02, 2000
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use ioctlsocket() instead of ioctl() so that we can import ws2_32.dll
again (untested).
parent
697bf65e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
34 deletions
+5
-34
socket.c
dlls/wsock32/socket.c
+3
-32
wsock32.spec
dlls/wsock32/wsock32.spec
+1
-2
winsock2.h
include/winsock2.h
+1
-0
No files found.
dlls/wsock32/socket.c
View file @
719c3a84
...
...
@@ -27,7 +27,6 @@
DEFAULT_DEBUG_CHANNEL
(
winsock
);
static
INT
(
WINAPI
*
WS2_recv
)(
SOCKET
s
,
char
*
buf
,
INT
len
,
INT
flags
);
/***********************************************************************
* WsControl()
...
...
@@ -184,7 +183,7 @@ DWORD WINAPI WsControl(DWORD protocoll,
/* MAC Address - Let's try to do this in a cross-platform way... */
#if defined(SIOCGIFHWADDR)
/* Linux */
strcpy
(
ifInfo
.
ifr_name
,
ifName
);
if
(
ioctl
(
sock
,
SIOCGIFHWADDR
,
&
ifInfo
)
<
0
)
if
(
ioctl
socket
(
sock
,
SIOCGIFHWADDR
,
(
ULONG
*
)
&
ifInfo
)
<
0
)
{
ERR
(
"Error obtaining MAC Address!
\n
"
);
close
(
sock
);
...
...
@@ -197,7 +196,7 @@ DWORD WINAPI WsControl(DWORD protocoll,
IntInfo
->
if_physaddrlen
=
6
;
}
#elif defined(SIOCGENADDR)
/* Solaris */
if
(
ioctl
(
sock
,
SIOCGENADDR
,
&
ifInfo
)
<
0
)
if
(
ioctl
socket
(
sock
,
SIOCGENADDR
,
(
ULONG
*
)
&
ifInfo
)
<
0
)
{
ERR
(
"Error obtaining MAC Address!
\n
"
);
close
(
sock
);
...
...
@@ -697,7 +696,7 @@ int WSCNTL_GetTransRecvStat(int intNumber, unsigned long *transBytes, unsigned l
INT
WINAPI
WSARecvEx
(
SOCKET
s
,
char
*
buf
,
INT
len
,
INT
*
flags
)
{
FIXME
(
"(WSARecvEx) partial packet return value not set
\n
"
);
return
WS2_
recv
(
s
,
buf
,
len
,
*
flags
);
return
recv
(
s
,
buf
,
len
,
*
flags
);
}
...
...
@@ -709,31 +708,3 @@ void WINAPI WS_s_perror(LPCSTR message)
FIXME
(
"(%s): stub
\n
"
,
message
);
return
;
}
/***********************************************************************
* WSOCK_LibMain
*/
BOOL
WINAPI
WSOCK_LibMain
(
HINSTANCE
inst
,
DWORD
reason
,
LPVOID
reserved
)
{
static
HMODULE
ws2_32
;
switch
(
reason
)
{
case
DLL_PROCESS_ATTACH
:
/* we import ws2_32 by hand, because we don't want to implicitly */
/* link to it; otherwise Unix calls like socket() get redirected */
/* to ws2_32.dll and this is not what we want. */
if
(
!
(
ws2_32
=
LoadLibraryA
(
"ws2_32.dll"
)))
{
ERR
(
"could not load ws2_32
\n
"
);
return
FALSE
;
}
WS2_recv
=
(
void
*
)
GetProcAddress
(
ws2_32
,
"recv"
);
break
;
case
DLL_PROCESS_DETACH
:
FreeLibrary
(
ws2_32
);
break
;
}
return
TRUE
;
}
dlls/wsock32/wsock32.spec
View file @
719c3a84
name wsock32
type win32
init WSOCK_LibMain
import
kernel
32.dll
import
ws2_
32.dll
import ntdll.dll
debug_channels (winsock)
...
...
include/winsock2.h
View file @
719c3a84
...
...
@@ -214,6 +214,7 @@ BOOL WINAPI WSACloseEvent(WSAEVENT event);
SOCKET
WINAPI
WSASocketA
(
int
af
,
int
type
,
int
protocol
,
LPWSAPROTOCOL_INFOA
lpProtocolInfo
,
GROUP
g
,
DWORD
dwFlags
);
extern
INT
WINAPI
ioctlsocket
(
SOCKET
s
,
LONG
cmd
,
ULONG
*
argp
);
#include "poppack.h"
...
...
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