projects
/
platform
/
upstream
/
perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d1b0f60
)
Change #31426 should also be applied to the PERL_IMPLICIT_SYS
author
Steve Hay
<SteveHay@planit.com>
Wed, 20 Jun 2007 16:03:10 +0000
(16:03 +0000)
committer
Steve Hay
<SteveHay@planit.com>
Wed, 20 Jun 2007 16:03:10 +0000
(16:03 +0000)
version of ioctl()
p4raw-id: //depot/perl@31428
win32/perlhost.h
patch
|
blob
|
history
diff --git
a/win32/perlhost.h
b/win32/perlhost.h
index
e042103
..
9974fd8
100644
(file)
--- a/
win32/perlhost.h
+++ b/
win32/perlhost.h
@@
-989,7
+989,14
@@
PerlLIOFileStat(struct IPerlLIO* piPerl, int handle, Stat_t *buffer)
int
PerlLIOIOCtl(struct IPerlLIO* piPerl, int i, unsigned int u, char *data)
{
- return win32_ioctlsocket((SOCKET)i, (long)u, (u_long*)data);
+ u_long u_long_arg;
+ int retval;
+
+ /* mauke says using memcpy avoids alignment issues */
+ memcpy(&u_long_arg, data, sizeof u_long_arg);
+ retval = win32_ioctlsocket((SOCKET)i, (long)u, &u_long_arg);
+ memcpy(data, &u_long_arg, sizeof u_long_arg);
+ return retval;
}
int