compiling 1.4 for freebsd 5.3 errors
Daniel J Drake
ddrake at netapp.com
Wed Feb 9 11:04:16 EST 2005
I'm compiling kerberos 1.4 for freebsd 5.3 and get the following build
errors:
gcc -fpic -DSHARED -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\"
-DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\"
-DKRB5_KRB4_COMPAT=1 -DHAVE_BT_RSEQ=1 -DKRB5_PRIVATE=1
-DKRB5_DEPRECATED=1 -DKRB5_DNS_LOOKUP_KDC=1 -DKRB5_DNS_LOOKUP=1
-DHAVE_RES_SEARCH=1 -DHAVE_NS_INITPARSE=1 -DHAVE_NS_NAME_UNCOMPRESS=1
-DHAVE_DN_SKIPNAME=1 -DHAVE_PRAGMA_WEAK_REF=1 -DDELAY_INITIALIZER=1
-DCONSTRUCTOR_ATTR_WORKS=1 -DDESTRUCTOR_ATTR_WORKS=1 -DENABLE_THREADS=1
-DHAVE_PTHREAD=1 -DHAVE_PTHREAD_ONCE=1 -DHAVE_PTHREAD_RWLOCK_INIT=1
-DHAVE_PTHREAD_RWLOCK_INIT_IN_THREAD_LIB=1 -DSTDC_HEADERS=1
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1
-DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1
-DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_REGCOMP=1
-DHAVE_REGEXEC=1 -DPOSIX_SIGTYPE=1 -Dkrb5_sigtype=void -DPOSIX_SIGNALS=1
-DHAVE_SA_LEN=1 -DGETPEERNAME_ARG2_TYPE=GETSOCKNAME_ARG2_TYPE
-DGETPEERNAME_ARG3_TYPE=GETSOCKNAME_ARG3_TYPE
-DGETSOCKNAME_ARG2_TYPE=struct\ sockaddr -DGETSOCKNAME_ARG3_TYPE=size_t
-I../../../include -I./../../../include -I../../../include/krb5
-I./../../../include/krb5 -g -O2 -Wall -Wmissing-prototypes
-Wcast-qual -Wcast-align -Wconversion -Wshadow -pedantic -D_THREAD_SAFE
-pthread -c hst_realm.c -o hst_realm.so.o && mv -f hst_realm.so.o
hst_realm.so
hst_realm.c: In function `krb5int_translate_gai_error':
hst_realm.c:370: error: `EAI_NODATA' undeclared (first use in this function)
hst_realm.c:370: error: (Each undeclared identifier is reported only once
hst_realm.c:370: error: for each function it appears in.)
*** Error code 1
Here is the function
krb5_error_code
krb5int_translate_gai_error (int num)
{
switch (num) {
#ifdef EAI_ADDRFAMILY
case EAI_ADDRFAMILY:
return EAFNOSUPPORT;
#endif
case EAI_AGAIN:
return EAGAIN;
case EAI_BADFLAGS:
return EINVAL;
case EAI_FAIL:
return KRB5_EAI_FAIL;
case EAI_FAMILY:
return EAFNOSUPPORT;
case EAI_MEMORY:
return ENOMEM;
#if EAI_NODATA != EAI_NONAME
case EAI_NODATA:
return KRB5_EAI_NODATA;
#endif
case EAI_NONAME:
return KRB5_EAI_NONAME;
case EAI_SERVICE:
return KRB5_EAI_SERVICE;
case EAI_SOCKTYPE:
return EINVAL;
#ifdef EAI_SYSTEM
case EAI_SYSTEM:
return errno;
#endif
}
abort ();
return -1;
}
I put in code to check if EAI_NODATA was defined and it wasn't.
I see that EAI_NODATA is #undef'd and then #defined in fake-addrinfo.h:
#undef EAI_NODATA
#define EAI_NODATA 7
This code in only included in the build if HAVE_GETADDRINFO is not
defined. Looking at autoconf.h, I see:
#define HAVE_GETADDRINFO 1
This stops EAI_NODATA from being #defined.
I don't want to go against what configure detects because its generally
correct, but the output of configure doesn't result in a sucessful build.
If anyone has any hints, I would appreciate it.
dan.
More information about the krbdev
mailing list