[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Several glibc problems...



On Wed, Nov 18, 1998 at 02:43:20PM +0100, Christian Meder wrote:
> On Wed, Nov 18, 1998 at 08:13:23AM -0500, Zack Weinberg wrote:
> > On Wed, 18 Nov 1998 09:46:36 +0100, Christian Meder wrote:
> > >
> > >My solution was to disable the syscalls which weren't wrapped for now.
> > 
> > This is a bug, I'll fix it this evening.  
> 
> Oh, great, thanks :-)

Wheeee, one more ugly hack dealt with!

> > >lsof sources will get really interesting with glibc2.1. The sources are 
> > >already undefining lots of stuff to get along with glibc2.0 ;-)
> > 
> > Hmm, could you be more specific?  We'd like to make its job easier if
> > possible. 
> 
> Just grab the latest lsof sources from ftp.debian.org or a mirror
> /debian/dists/slink/main/source/utils/lsof_4.37.tar.gz
> and try to build it under glibc2.1.

Actually, it's a very easy fix:

diff -uNr lsof-4.37/dialects/linux/proc/dlsof.h
lsof-ppc/dialects/linux/proc/dlsof.h
--- lsof-4.37/dialects/linux/proc/dlsof.h       Wed Apr 29 14:43:15 1998
+++ lsof-ppc/dialects/linux/proc/dlsof.h        Mon Nov  9 17:53:14 1998
@@ -46,7 +46,12 @@
 #include <string.h>
 #include <setjmp.h>
 #include <unistd.h>
+#if defined(__GLIBC__) && (__GLIBC__ >= 2) && (__GLIBC__ + __GLIBC_MINOR__ >= 3)
+#include <netinet/tcp.h>
+typedef unsigned short int umode_t;
+#else
 #include <linux/tcp.h>
+#endif
 #undef htonl
 #undef ntohl
 #define        htonl   BYTEORDER_htonl


It exhibits a few slightly buggy behaviors when running as a user
(shows a few files from processes not owned by the user, but not all),
but otherwise works fine.


I'm assuming the kernel headers will become less relevant to user
programs with glibc 2.1, but in 2.0 I recall that the whole reason for
including kernel headers in libc6-dev was that certain sets were known
to break compilation.  I don't recall the gory details, though.

Dan


Reply to: