1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

64 bit fix from Uros Prestor <uros@turbolinux.com>.

Jeremy.
This commit is contained in:
Jeremy Allison 0001-01-01 00:00:00 +00:00
parent 7a698c1f23
commit 9a5471b3e8

View File

@ -174,7 +174,7 @@ BOOL message_send_pid(pid_t pid, int msg_type, void *buf, size_t len)
if (!p) goto failed;
memcpy(p, &rec, sizeof(rec));
if (len > 0) memcpy((void *)((unsigned)p+sizeof(rec)), buf, len);
if (len > 0) memcpy((void *)((char*)p+sizeof(rec)), buf, len);
dbuf.dptr = p;
dbuf.dsize = len + sizeof(rec);
@ -188,8 +188,8 @@ BOOL message_send_pid(pid_t pid, int msg_type, void *buf, size_t len)
if (!p) goto failed;
memcpy(p, dbuf.dptr, dbuf.dsize);
memcpy((void *)((unsigned)p+dbuf.dsize), &rec, sizeof(rec));
if (len > 0) memcpy((void *)((unsigned)p+dbuf.dsize+sizeof(rec)), buf, len);
memcpy((void *)((char*)p+dbuf.dsize), &rec, sizeof(rec));
if (len > 0) memcpy((void *)((char*)p+dbuf.dsize+sizeof(rec)), buf, len);
free(dbuf.dptr);
dbuf.dptr = p;