Portable build framework for OpenNTPD
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
884 B

  1. --- client.orig 2014-12-28 11:10:23.875157132 -0600
  2. +++ client.c 2014-12-28 11:12:46.095160215 -0600
  3. @@ -142,10 +142,12 @@
  4. 0)) == -1)
  5. fatal("client_query socket");
  6. +#ifdef SO_RTABLE
  7. if (p->rtable != -1 &&
  8. setsockopt(p->query->fd, SOL_SOCKET, SO_RTABLE,
  9. &p->rtable, sizeof(p->rtable)) == -1)
  10. fatal("client_query setsockopt SO_RTABLE");
  11. +#endif
  12. if (connect(p->query->fd, sa, SA_LEN(sa)) == -1) {
  13. if (errno == ECONNREFUSED || errno == ENETUNREACH ||
  14. errno == EHOSTUNREACH || errno == EADDRNOTAVAIL) {
  15. @@ -248,10 +250,12 @@
  16. return (0);
  17. }
  18. +#ifdef SO_RTABLE
  19. if (p->rtable != -1 &&
  20. setsockopt(p->query->fd, SOL_SOCKET, SO_RTABLE, &p->rtable,
  21. sizeof(p->rtable)) == -1)
  22. fatal("client_dispatch setsockopt SO_RTABLE");
  23. +#endif
  24. for (cmsg = CMSG_FIRSTHDR(&somsg); cmsg != NULL;
  25. cmsg = CMSG_NXTHDR(&somsg, cmsg)) {