$NetBSD: patch-ad,v 1.2 2010/09/10 20:07:29 joerg Exp $

--- Xfuncproto.h.in.orig	2010-08-10 14:18:54.000000000 +0000
+++ Xfuncproto.h.in
@@ -83,7 +83,7 @@ in this Software without prior written a
 # define _X_ATTRIBUTE_PRINTF(x,y)
 #endif /* GNUC >= 4 */
 
-#if defined(__GNUC__) && (__GNUC__ >= 4) && !defined(__CYGWIN__)
+#if defined(__GNUC__) && (__GNUC__ >= 4) && !defined(__CYGWIN__) && !defined(__sun__)
 # define _X_EXPORT      __attribute__((visibility("default")))
 # define _X_HIDDEN      __attribute__((visibility("hidden")))
 # define _X_INTERNAL    __attribute__((visibility("internal")))
