[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [leafnode-list] b8 compile error under OSF1
Joerg Deitrich wrote:
> [dietrich@cipw08 leafnode-2.0b8]$ make
> gcc -g -O2 -I. -DHAVE_CONFIG_H -Wall -W -Wstrict-prototypes
> -Wmissing-prototypes -g -c nntputil.c -o nntputil.o
> In file included from nntputil.c:24:
> /usr/include/sys/socket.h:191: conflicting types for `socklen_t'
> leafnode.h:28: previous declaration of `socklen_t'
> make: *** [nntputil.o] Error 1
I already built a check for socklen_t into configure.in:
dnl Check whether socklen_t is defined in /usr/include/sys/socket.h
AC_MSG_CHECKING(for socklen_t)
AC_CACHE_VAL(cf_cv_socklen_t, AC_TRY_COMPILE([
#include <sys/types.h>
#include <sys/socket.h>],[
socklen_t fodder;
return fodder;],
[cf_cv_socklen_t="yes"],
[cf_cv_socklen_t="no"])
)
if test "$cf_cv_socklen_t" = "yes"
then
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_SOCKLEN_T)
else
AC_MSG_RESULT(no)
fi
and in leafnode.h:
#ifndef HAVE_SOCKLEN_T
typedef unsigned int socklen_t;
#endif
--Cornelius.
--
/* Cornelius Krasel, U Wuerzburg, Dept. of Pharmacology, Versbacher Str. 9 */
/* D-97078 Wuerzburg, Germany email: krasel@xxxxxxxxxxxxxxxxxxxxxxxxxxxx */
/* "Science is the game we play with God to find out what His rules are." */
--
leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx -- mailing list for leafnode
To unsubscribe, send mail with "unsubscribe" in the subject to the list