]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Solaris: Fix non PRIVSEP compile
authorRoy Marples <roy@marples.name>
Thu, 28 Nov 2019 22:13:35 +0000 (01:13 +0300)
committerRoy Marples <roy@marples.name>
Thu, 28 Nov 2019 22:13:35 +0000 (01:13 +0300)
src/dhcp6.c
src/dhcpcd.c
src/ipv6nd.c
src/ipv6nd.h

index 4874fb78db96decd25f0708b102372da675e2b0f..40854a4937541ebfc1ebbe626b0495f84793f8ed 100644 (file)
@@ -4002,8 +4002,9 @@ dhcp6_handleifa(int cmd, struct ipv6_addr *ia, pid_t pid)
                if (ifp->ctx->options & DHCPCD_PRIVSEP) {
                        if (ps_inet_opendhcp6(ia) == -1)
                                logerr(__func__);
-               } else {
+               } else
 #endif
+               {
                        if (ia->dhcp6_fd == -1)
                                ia->dhcp6_fd = dhcp6_openudp(ia->iface->index,
                                    &ia->addr);
index f6e924fc17c99c5b8ba68d443d0d2d0e48b74cd3..269f6561d2a1ec10b558b8da5f37e1f9fb244835 100644 (file)
@@ -1632,7 +1632,7 @@ main(int argc, char **argv)
 #ifdef INET
        ctx.udp_fd = -1;
 #endif
-#ifdef INET6
+#if defined(INET6) && !defined(__sun)
        ctx.nd_fd = -1;
 #endif
 #ifdef DHCP6
index ebd427d1c19489705ce68cfcb345c108e41db852..1af16f173b8de6f2db2253d420c015b75fc74118 100644 (file)
@@ -236,7 +236,7 @@ eexit:
 }
 
 #ifdef __sun
-static int
+int
 ipv6nd_open(struct interface *ifp)
 {
        int fd;
index d070b8aa0695383cc8e74ca1c63f4a4c6a188f0f..12b125a4e320a9da670825493b3e9286052aca81 100644 (file)
@@ -96,7 +96,11 @@ struct rs_state {
 #define        RETRANS_TIMER                   1000    /* milliseconds */
 #define        DELAY_FIRST_PROBE_TIME          5       /* seconds */
 
+#ifdef __sun
+int ipv6nd_open(struct interface *);
+#else
 int ipv6nd_open(struct dhcpcd_ctx *);
+#endif
 void ipv6nd_recvmsg(struct dhcpcd_ctx *, struct msghdr *);
 void ipv6nd_printoptions(const struct dhcpcd_ctx *,
     const struct dhcp_opt *, size_t);