$NetBSD: patch-aa,v 1.1 2005/04/07 09:16:47 seb Exp $

--- dcraw.c.orig	2005-04-07 09:09:23.000000000 +0000
+++ dcraw.c
@@ -163,7 +163,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 *memmem (char *haystack, size_t haystacklen,
 	      char *needle, size_t needlelen)
 {
