[OpenAFS-devel] Building 1.5.1 on Linux (FC3)
Simon Wilkinson
sxw@inf.ed.ac.uk
Wed, 10 May 2006 12:36:13 +0100 (BST)
Hi,
Just wondering if anyone has tried building OpenAFS 1.5.1 on Linux, or if
I'm missing something blatantly obvious...
I'm seeing a problem with conflicting definitions of encrypt() (in
des/crypt.c) when building libafsrpc
The culprit seems to be the following change that went in as part of the
demand/attach fileserver changes...
--- osconf.m4 9 Mar 2006 06:34:32 -0000 1.80
+++ osconf.m4 17 Mar 2006 19:54:37 -0000 1.81
@@ -971,6 +971,18 @@
;;
esac
+
+
+dnl pthreads fixes
+case $AFS_SYSNAME in
+dnl we'll go ahead and turn on XOPEN2K and ISO_C99
+dnl if this causes problems, we should scale back to _XOPEN_SOURCE=500
+ *linux*)
+ MT_CFLAGS="${MT_CFLAGS} -D_XOPEN_SOURCE=600 -D_BSD_SOURCE"
+ ;;
+esac
+
+
dnl Disable the default for debugging/optimization if not enabled
if test "x$enable_debug_kernel" = "xno"; then
KERN_DBG=
This results in the definition of __USE_XOPEN, which in turn causes
/usr/include/unistd.h to include its definition of encrypt(), which has a
different prototype to the AFS one.
Backing out this change solves the compilation problem.
Cheers,
Simon.