- Marco Maggi reported that compilation failed when configured --with-gssapi
  and GNU GSS installed due to a missing mutual exclusion of header files in
  the Kerberos 5 code path. He also verified that my patch worked for him.
diff --git a/CHANGES b/CHANGES
index 20ed3f2..cbe5711 100644
--- a/CHANGES
+++ b/CHANGES
@@ -6,6 +6,11 @@
 
                                   Changelog
 
+Yang Tse (11 Nov 2009)
+- Marco Maggi reported that compilation failed when configured --with-gssapi
+  and GNU GSS installed due to a missing mutual exclusion of header files in
+  the Kerberos 5 code path. He also verified that my patch worked for him.
+
 Daniel Stenberg (11 Nov 2009)
 - Constantine Sapuntzakis posted bug #2891595
   (http://curl.haxx.se/bug/view.cgi?id=2891595) which identified how an entry
diff --git a/RELEASE-NOTES b/RELEASE-NOTES
index 89549d7..635ba0b 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES
@@ -17,6 +17,7 @@
  o portability enhancement for OS's without orthogonal directory tree structure
  o progress meter/callback during FTP connection
  o DNS cache timeout while transfer in progress
+ o compilation when configured --with-gssapi having GNU GSS installed
 
 This release includes the following known bugs:
 
diff --git a/lib/krb5.c b/lib/krb5.c
index e763912..36afc3c 100644
--- a/lib/krb5.c
+++ b/lib/krb5.c
@@ -46,14 +46,17 @@
 #include <netdb.h>
 #endif
 #include <string.h>
-#ifdef HAVE_GSSMIT
-/* MIT style */
-#include <gssapi/gssapi.h>
-#include <gssapi/gssapi_generic.h>
-#include <gssapi/gssapi_krb5.h>
+
+#ifdef HAVE_GSSGNU
+#  include <gss.h>
+#elif defined HAVE_GSSMIT
+   /* MIT style */
+#  include <gssapi/gssapi.h>
+#  include <gssapi/gssapi_generic.h>
+#  include <gssapi/gssapi_krb5.h>
 #else
-/* Heimdal-style */
-#include <gssapi.h>
+   /* Heimdal-style */
+#  include <gssapi.h>
 #endif
 
 #include "urldata.h"