[pim] Compile fixes for FreeBSD.
diff --git a/pimd/pim_igmp_join.c b/pimd/pim_igmp_join.c
index 7183997..693a42b 100644
--- a/pimd/pim_igmp_join.c
+++ b/pimd/pim_igmp_join.c
@@ -20,10 +20,16 @@
$QuaggaId: $Format:%an, %ai, %h$ $
*/
+#include <sys/types.h>
+#include <sys/socket.h>
#include <string.h>
#include "pim_igmp_join.h"
+#ifndef SOL_IP
+#define SOL_IP IPPROTO_IP
+#endif
+
#ifndef MCAST_JOIN_SOURCE_GROUP
#define MCAST_JOIN_SOURCE_GROUP 46
struct group_source_req
diff --git a/pimd/test_igmpv3_join.c b/pimd/test_igmpv3_join.c
index af93ab6..fe64fbc 100644
--- a/pimd/test_igmpv3_join.c
+++ b/pimd/test_igmpv3_join.c
@@ -25,9 +25,9 @@
#include <errno.h>
#include <string.h>
#include <unistd.h>
-#include <net/if.h>
#include <sys/types.h>
#include <sys/socket.h>
+#include <net/if.h>
#include <arpa/inet.h>
#include "pim_igmp_join.h"