$NetBSD: patch-aa,v 1.2 2006/01/05 04:37:33 uebayasi Exp $

--- dcraw.c.orig	2006-01-05 13:30:23.000000000 +0900
+++ dcraw.c
@@ -182,7 +182,9 @@ struct decode {
 	3 G R G R G R	3 B G B G B G	3 R G R G R G	3 G B G B G B
  */
 
-#ifndef __GLIBC__
+#include <sys/param.h>
+
+#if !(defined(__GLIBC__) || (defined(__NetBSD__) && (__NetBSD_Version__ >= 300000000)))
 char *my_memmem (char *haystack, size_t haystacklen,
 	      char *needle, size_t needlelen)
 {
