Revision 0b3bf4b1

View differences:

client/client.c
250 250
  bzero(&sa, sizeof(sa));
251 251
  sa.sun_family = AF_UNIX;
252 252
  strcpy(sa.sun_path, server_path);
253
  if (connect(server_fd, (struct sockaddr *) &sa, sizeof(struct sockaddr)) < 0)
253
  if (connect(server_fd, (struct sockaddr *) &sa, SUN_LEN(&sa)) < 0)
254 254
    die("Unable to connect to server control socket (%s): %m", server_path);
255 255
  if (fcntl(server_fd, F_SETFL, O_NONBLOCK) < 0)
256 256
    die("fcntl: %m");
sysdep/unix/io.c
774 774
  unlink(name);
775 775
  sa.sun_family = AF_UNIX;
776 776
  strcpy(sa.sun_path, name);
777
  if (bind(fd, (struct sockaddr *) &sa, sizeof(sa)) < 0)
777
  if (bind(fd, (struct sockaddr *) &sa, SUN_LEN(&sa)) < 0)
778 778
    ERR("bind");
779 779
  if (listen(fd, 8))
780 780
    ERR("listen");

Also available in: Unified diff