NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Any one here have Radclock working on NetBSD?



In article <53BC3902.15128.17025FC%netbsd.lordynet.org@localhost>,
David Lord <netbsd%lordynet.org@localhost> wrote:
>
>Hi
>
>I've downloaded radclock-0.3.3 from  
>http://www.synclab.org/radclock/ but although some of
>the files indicate it might be possible to compile on
>NetBSD.I'm unable to get it to build on either 
>NetBSD-6/i386 or NetBSD-6.99.44/amd64.
>
>Has anyone ported it to NetBSD?

Here's enough to get it compiled.

christos

diff --git a/examples/radclock_capture_packet.c 
b/examples/radclock_capture_packet.c
index 1c8c04c..c02e854 100644
--- a/examples/radclock_capture_packet.c
+++ b/examples/radclock_capture_packet.c
@@ -41,7 +41,11 @@
 #include <netinet/in.h>
 #include <netinet/udp.h>
 #include <netinet/ip.h>
+#ifndef __NetBSD__
 #include <net/ethernet.h>
+#else
+#include <net/if_ether.h>
+#endif
 #include <arpa/inet.h>
 
 #include <pcap.h>
diff --git a/libradclock/kclock.h b/libradclock/kclock.h
index 07bff5b..ef19cfc 100644
--- a/libradclock/kclock.h
+++ b/libradclock/kclock.h
@@ -34,7 +34,7 @@
  * This is very strongly inspired by the bintime structure in FreeBSD. See
  * sys/time.h there for the details.
  */
-#if defined (__FreeBSD__)
+#if defined (__FreeBSD__) || defined(__NetBSD__)
 #include <sys/time.h>
 #else
 struct bintime {
diff --git a/radclock/create_stamp.c b/radclock/create_stamp.c
index 14becba..0cf5317 100644
--- a/radclock/create_stamp.c
+++ b/radclock/create_stamp.c
@@ -31,7 +31,11 @@
 #include <netinet/in_systm.h>
 
 #include <arpa/inet.h>
+#ifndef __NetBSD__
 #include <net/ethernet.h>
+#else
+#include <net/if_ether.h>
+#endif
 #include <netinet/in.h>
 #include <netinet/ip.h>
 #include <netinet/ip6.h>
diff --git a/radclock/pthread_ntpserver.c b/radclock/pthread_ntpserver.c
index 5b5ccec..d3e6b72 100644
--- a/radclock/pthread_ntpserver.c
+++ b/radclock/pthread_ntpserver.c
@@ -35,7 +35,11 @@
 #include <netinet/in.h>
 #include <netinet/udp.h>
 #include <netinet/ip.h>
+#ifndef __NetBSD__
 #include <net/ethernet.h>
+#else
+#include <net/if_ether.h>
+#endif
 
 #include <errno.h>
 #include <pthread.h>
diff --git a/radclock/radclock_main.c b/radclock/radclock_main.c
index bb26faa..9a846c7 100644
--- a/radclock/radclock_main.c
+++ b/radclock/radclock_main.c
@@ -36,7 +36,11 @@
 #include <netinet/in.h>
 #include <netinet/udp.h>
 #include <netinet/ip.h>
+#ifndef __NetBSD__
 #include <net/ethernet.h>
+#else
+#include <net/if_ether.h>
+#endif
 #include <arpa/inet.h>
 
 #include <errno.h>
diff --git a/radclock/stampinput-livepcap.c b/radclock/stampinput-livepcap.c
index 6a46378..90dcab8 100644
--- a/radclock/stampinput-livepcap.c
+++ b/radclock/stampinput-livepcap.c
@@ -29,7 +29,11 @@
 #include <sys/socket.h>
 
 #include <arpa/inet.h>
+#ifndef __NetBSD__
 #include <net/ethernet.h>
+#else
+#include <net/if_ether.h>
+#endif
 #include <net/if_arp.h>
 #include <netinet/in.h>
 



Home | Main Index | Thread Index | Old Index