summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.Merijn Brand <h.m.brand@xs4all.nl>2009-09-09 09:32:05 +0200
committerH.Merijn Brand <h.m.brand@xs4all.nl>2009-09-09 09:32:05 +0200
commit178e6016122becf7dc83010b66685f27ec4adbb9 (patch)
tree205ed8627a7c11bfd815cfb352ead551d03dac4d
parent0a3660e34f2e0cc69eaa07cad124563ed3e6fbdb (diff)
downloadperl-178e6016122becf7dc83010b66685f27ec4adbb9.tar.gz
error 1539: Cannot do arithmetic with pointers to objects of unknown size.
-rw-r--r--ext/Socket/Socket.xs4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/Socket/Socket.xs b/ext/Socket/Socket.xs
index 38202252fe..16b893b3c8 100644
--- a/ext/Socket/Socket.xs
+++ b/ext/Socket/Socket.xs
@@ -343,7 +343,7 @@ pack_sockaddr_un(pathname)
* character, starting with \0 and possibly including \0s,
* therefore the length of the structure must denote the
* end of that character array */
- addr_len = (void *)&sun_ad.sun_path - (void *)&sun_ad + len;
+ addr_len = (char *)&(sun_ad.sun_path) - (char *)&sun_ad + len;
} else {
addr_len = sizeof sun_ad;
}
@@ -386,7 +386,7 @@ unpack_sockaddr_un(sun_sv)
if (addr.sun_path[0] == '\0') {
/* Linux-style abstract socket address begins with a nul
* and can contain nuls. */
- addr_len = (void *)&addr - (void *)&addr.sun_path + sockaddrlen;
+ addr_len = (char *)&addr - (char *)&(addr.sun_path) + sockaddrlen;
} else {
for (addr_len = 0; addr.sun_path[addr_len]
&& addr_len < sizeof addr.sun_path; addr_len++);