[klibc] select.h not working on ia64

Kay Sievers kay.sievers at vrfy.org
Sat Mar 12 02:34:55 PST 2005


On Sat, 2005-03-12 at 05:08 +0200, Martin Schlemmer wrote:
> On Sat, 2005-03-12 at 02:01 +0100, Kay Sievers wrote:
> > __FD_SET, __FD_CLR, __FD_ISSET, __FD_ZERO
> > 
> > are inside of __KERNEL__ in:
> >   include/asm-ia64/posix_types.h
> > 
> > and therefore not available.
> > 
> > I've added stuff like this to our code:
> >   #ifndef __FD_SET
> >   #define __FD_SET(d, set) ((set)->fds_bits[__FDELT(d)] |= __FDMASK(d))
> >   #endif
> > 
> > but it would be nice if this can be solved in klibc.
> > 
> 
> Sorda OT, but what about the pwd.h and simple malloc.h that you and Greg
> also did for udev?

I've removed all the Makefile magic in the latest version. I've wrapped
the pwd stuff in our own function cause we need to use it for a static
glibc build too. libsysfs is rewritten and we've removed all the
incompatible stuff. :)

>   I know they are a bit limited, but they would help
> for the '#ifndef __KLIBC__' abuse that here and there are needed.  Would
> be nice if you guys could submit it, or if too busy, I can do a patch if
> there is nothing seriously wrong with them (besides being a bit limited,
> but that can still change with time).

The malloc.h was a simple wrapper that included some other header, that
can be included in klibc. The other stuff is a bit more complicated, you
can't really use fgets() and similar with klibc cause it is the slowest
thing on earth with a syscall for every character to read. We mmap the
file for that reason and have our own cheap kind of buffering.

> The mntent.h stuff would have
> been nice if its was not a fairly big sysfs hack ;)

We just removed mntent from the new libsysfs, we no longer support other
mount points than /sys. You still can override it with the environment,
but it will not parse /proc/mounts anymore.

Thanks,
Kay



More information about the klibc mailing list