$NetBSD$

--- include/vigra/cachedfileimage.hxx.orig	2010-10-30 19:45:49.000000000 +0000
+++ include/vigra/cachedfileimage.hxx
@@ -556,7 +556,7 @@ class NotifyingDirectionSelector;
 template <class T, class Notify>
 class NotifyingDirectionSelector<UnstridedArrayTag, T, Notify>
 {
-#ifdef __GNUC__
+#if defined(__GNUC__) && !defined(__clang__)
 friend class Notify::self_type;
 #else
 friend typename Notify::self_type;
@@ -602,7 +602,7 @@ private:
 
 template <class T, class Notify>
 class NotifyingDirectionSelector<StridedArrayTag, T, Notify> {
-#ifdef __GNUC__
+#if defined(__GNUC__) && !defined(__clang__)
 friend class Notify::self_type;
 #else
 friend typename Notify::self_type;
