krb5 commit: Avoid multiply defining OIDs in tests/gssapi

Tom Yu tlyu at MIT.EDU
Fri Sep 14 14:11:55 EDT 2012


https://github.com/krb5/krb5/commit/6d9a424a12cc23da9f4b3dc71502f9ad917bc1fd
commit 6d9a424a12cc23da9f4b3dc71502f9ad917bc1fd
Author: Tom Yu <tlyu at mit.edu>
Date:   Fri Sep 14 13:55:36 2012 -0400

    Avoid multiply defining OIDs in tests/gssapi
    
    Declarations of gss_OID_desc mech_krb5, etc. in tests/gssapi/common.h
    can result in multiple definitions when the test programs are linked.
    Prefix the declarations with "extern" to prevent this.

 src/tests/gssapi/common.h |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/tests/gssapi/common.h b/src/tests/gssapi/common.h
index be3bdb9..43d692d 100644
--- a/src/tests/gssapi/common.h
+++ b/src/tests/gssapi/common.h
@@ -35,12 +35,12 @@
 
 #include <gssapi/gssapi_krb5.h>
 
-gss_OID_desc mech_krb5;
-gss_OID_desc mech_spnego;
-gss_OID_desc mech_iakerb;
-gss_OID_set_desc mechset_krb5;
-gss_OID_set_desc mechset_spnego;
-gss_OID_set_desc mechset_iakerb;
+extern gss_OID_desc mech_krb5;
+extern gss_OID_desc mech_spnego;
+extern gss_OID_desc mech_iakerb;
+extern gss_OID_set_desc mechset_krb5;
+extern gss_OID_set_desc mechset_spnego;
+extern gss_OID_set_desc mechset_iakerb;
 
 /* Display an error message (containing msg) and exit if major is an error. */
 void check_gsserr(const char *msg, OM_uint32 major, OM_uint32 minor);


More information about the cvs-krb5 mailing list