Index: bin/varnishd/common.h
--- bin/varnishd/common.h.orig	2009-02-12 12:15:25 +0100
+++ bin/varnishd/common.h	2009-03-27 13:09:35 +0100
@@ -52,3 +52,8 @@
 		fprintf(stderr, "Error: " __VA_ARGS__);		\
 		exit(2);					\
 	} while (0);
+
+#ifndef NAN
+#define NAN (__builtin_nanf(""))
+#endif
+
Index: bin/varnishd/mgt_child.c
--- bin/varnishd/mgt_child.c.orig	2009-02-12 12:15:25 +0100
+++ bin/varnishd/mgt_child.c	2009-03-27 13:09:35 +0100
@@ -238,6 +238,21 @@
 	struct vev *e;
 	int i, cp[2];
 
+#ifdef OPKG_PIDFILE
+	{
+		pid_t pid;
+		FILE *fp;
+
+		pid = getpid();
+		if ((fp = fopen(OPKG_PIDFILE, "w")) == NULL) {
+			fprintf(stderr, "varnishd:ERROR: cannot write PID file '%s'\n", OPKG_PIDFILE);
+			exit(1);
+		}
+		fprintf(fp, "%ld\n", (long)pid);
+		fclose(fp);
+	}
+#endif
+
 	if (child_state != CH_STOPPED && child_state != CH_DIED)
 		return;
 
Index: configure
--- configure.orig	2009-02-12 12:15:43 +0100
+++ configure	2009-03-27 13:10:04 +0100
@@ -26417,9 +26417,6 @@
 	VCC_CC="$ac_cv_env_VCC_CC_value"
 else
 	case $target in
-	*-*-solaris*)
-		VCC_CC="cc -Kpic -G -o %o %s"
-		;;
 	*-*-darwin*)
 		VCC_CC="exec cc -dynamiclib -Wl,-undefined,dynamic_lookup -o %o %s"
 		;;
