Add an evil cast, because POSIX/SUSv2 define connect(2) require
the second argument to be of type ``struct sockaddr *''.
This commit is contained in:
parent
331b59214b
commit
8d5b4ee1ca
@ -91,7 +91,7 @@ int RAND_egd(const char *path)
|
|||||||
len = offsetof(struct sockaddr_un, sun_path) + strlen(path);
|
len = offsetof(struct sockaddr_un, sun_path) + strlen(path);
|
||||||
fd = socket(AF_UNIX, SOCK_STREAM, 0);
|
fd = socket(AF_UNIX, SOCK_STREAM, 0);
|
||||||
if (fd == -1) return (-1);
|
if (fd == -1) return (-1);
|
||||||
if (connect(fd, &addr, len) == -1) goto err;
|
if (connect(fd, (struct sockaddr *)&addr, len) == -1) goto err;
|
||||||
buf[0] = 1;
|
buf[0] = 1;
|
||||||
buf[1] = 255;
|
buf[1] = 255;
|
||||||
write(fd, buf, 2);
|
write(fd, buf, 2);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user