Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zsolt Vadász
wine
Commits
719c3a84
Commit
719c3a84
authored
24 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
Use ioctlsocket() instead of ioctl() so that we can import ws2_32.dll
again (untested).
parent
697bf65e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dlls/wsock32/socket.c
+3
-32
3 additions, 32 deletions
dlls/wsock32/socket.c
dlls/wsock32/wsock32.spec
+1
-2
1 addition, 2 deletions
dlls/wsock32/wsock32.spec
include/winsock2.h
+1
-0
1 addition, 0 deletions
include/winsock2.h
with
5 additions
and
34 deletions
dlls/wsock32/socket.c
+
3
−
32
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
;
}
This diff is collapsed.
Click to expand it.
dlls/wsock32/wsock32.spec
+
1
−
2
View file @
719c3a84
name wsock32
type win32
init WSOCK_LibMain
import
kernel
32.dll
import
ws2_
32.dll
import ntdll.dll
debug_channels (winsock)
...
...
This diff is collapsed.
Click to expand it.
include/winsock2.h
+
1
−
0
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"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment