Index: src/arc4random.c
--- src/arc4random.c.orig	2008-11-22 00:22:49 +0100
+++ src/arc4random.c	2008-11-23 09:32:47 +0100
@@ -46,6 +46,11 @@
 #include <sys/time.h>
 #include <sys/sysctl.h>
 
+#if !defined(CTL_KERN) || !defined(KERN_RANDOM)
+#undef  __NO_SYSCTL__
+#define __NO_SYSCTL__
+#endif
+
 #if defined __NO_SYSCTL__
 #include <err.h>
 #include <errno.h>
@@ -61,14 +66,16 @@
 #define _ARC4_LOCK()  pthread_mutex_lock(&mux)
 #define _ARC4_UNLOCK() pthread_mutex_unlock(&mux)
 #else               /* !__LINUX__ */
-#include "thread_private.h"
+#define _ARC4_LOCK()
+#define _ARC4_UNLOCK()
 #endif              /* __LINUX__ */
 
-#ifdef __GNUC__
+#ifdef __LINUX__
 #define inline __inline
 #define KERN_ARND KERN_RANDOM
 #else				/* !__GNUC__ */
 #define inline
+#define KERN_ARND 0
 #endif				/* !__GNUC__ */
 
 struct arc4_stream {
Index: src/ntp.c
--- src/ntp.c.orig	2007-11-11 07:04:33 +0100
+++ src/ntp.c	2008-11-23 09:30:53 +0100
@@ -91,9 +91,7 @@
 #define MILLION_L    1000000l		/* For conversion to/from timeval */
 #define MILLION_D       1.0e6		/* Must be equal to MILLION_L */
 
-#ifdef __GLIBC__
 #define SA_LEN(x)	sizeof(*x)
-#endif
 
 struct ntp_data {
 	u_char		status;
