Arla and Linux with glibc
Brad Keryan
keryan at andrew.cmu.edu
Mon Mar 16 23:08:36 CET 1998
I had some minor trouble building the userspace parts of Arla under
Linux/x86 with glibc 2.0.6 and kernel 2.1.89.
On my system (RedHat 5.0) there is no <nlist.h>, instead, there is a
<libelf/nlist.h>, which appears to be the same as <nlist.h> on Solaris.
Also, <errnos.h>, which is included by <errno.h>, has the following line:
# define errno (*__errno_location ())
which causes arla compilation to fail because some data structures it uses
have a field called errno. At the end of this message is a patch that got
arla to compile, by checking for nlist.h and libelf/nlist.h, and by
#undef-ing errno in xfs_message.h. I'm not sure if #undef-ing errno is the
right way to handle that problem (it seems that if you #define _LIBC
before including errno.h the problem would go away) but it worked.
arlad -t seems to work correctly, ie, I could poke around in
/afs/andrew.cmu.edu, 'cat' my own web page (on AFS), etc.
Also, is anybody working on Linux 2.1.x support for Arla's xfs?
Brad
---
Here is the patch:
--- arla-0.2-clean/configure.in Mon Mar 16 05:16:36 1998
+++ arla-0.2/configure.in Mon Mar 16 16:13:58 1998
@@ -304,6 +304,7 @@
AC_CHECK_HEADERS(sys/sysctl.h sys/sysent.h sys/sysproto.h sys/time.h)
AC_CHECK_HEADERS(sys/tty.h sys/types.h sys/uio.h)
AC_CHECK_HEADERS(termios.h unistd.h winsock.h)
+AC_CHECK_HEADERS(nlist.h libelf/nlist.h)
dnl
dnl Check for struct winsize
--- arla-0.2-clean/include/config.h.in Mon Mar 16 05:18:18 1998
+++ arla-0.2/include/config.h.in Mon Mar 16 16:15:48 1998
@@ -264,6 +264,9 @@
/* Define if you have the <ktypes.h> header file. */
#undef HAVE_KTYPES_H
+/* Define if you have the <libelf/nlist.h> header file. */
+#undef HAVE_LIBELF_NLIST_H
+
/* Define if you have the <ndbm.h> header file. */
#undef HAVE_NDBM_H
@@ -281,6 +284,9 @@
/* Define if you have the <netinet6/in6.h> header file. */
#undef HAVE_NETINET6_IN6_H
+
+/* Define if you have the <nlist.h> header file. */
+#undef HAVE_NLIST_H
/* Define if you have the <paths.h> header file. */
#undef HAVE_PATHS_H
--- arla-0.2-clean/lwp/fasttime.c Mon Mar 16 05:16:51 1998
+++ arla-0.2/lwp/fasttime.c Mon Mar 16 16:18:45 1998
@@ -48,7 +48,14 @@
#ifndef AFS_AIX_ENV
#include <sys/mman.h>
#endif
+
+#ifdef HAVE_NLIST_H
#include <nlist.h>
+#else
+#ifdef HAVE_LIBELF_NLIST_H
+#include <libelf/nlist.h>
+#endif
+#endif
extern char *valloc();
int ft_debug;
--- arla-0.2-clean/xfs/include/xfs_message.h Mon Mar 16 05:17:11 1998
+++ arla-0.2/xfs/include/xfs_message.h Mon Mar 16 16:39:20 1998
@@ -202,6 +202,10 @@
#define XFS_MSG_PIOCTL 22
#define XFS_MSG_WAKEUP_DATA 23
+#ifdef errno
+#undef errno
+#endif
+
/* XFS_MESSAGE_WAKEUP */
struct xfs_message_wakeup {
struct xfs_message_header header;
More information about the Arla-drinkers
mailing list