Hello, I'm trying to compile paludis ([1]) on my Gentoo PPC/uclibc system, but it fails due to an undefined reference to pselect.
For testing purpose I've taken the example from pselect manpage, which fails the same way as paludis does. The failing file is attached to this mail. Here comes the error: $ make pselect cc pselect.c -o pselect /tmp/ccLqJzkO.o: In function `main': pselect.c:(.text+0x98): undefined reference to `pselect' collect2: ld returned 1 exit status make: *** [pselect] Error 1 Do I have to link to some library, or is this an error in uclibc? Regards, -markus [1] http://paludis.pioto.org/
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <time.h> #include <sys/types.h> #include <unistd.h> int main(void) { fd_set rfds; struct timespec tv; int retval; /* Watch stdin (fd 0) to see when it has input. */ FD_ZERO(&rfds); FD_SET(0, &rfds); /* Wait up to five seconds. */ tv.tv_sec = 5; tv.tv_nsec = 0; retval = pselect(1, &rfds, NULL, NULL, &tv, NULL); /* Don't rely on the value of tv now! */ if (retval == -1) perror("pselect()"); else if (retval) printf("Data is available now.\n"); /* FD_ISSET(0, &rfds) will be true. */ else printf("No data within five seconds.\n"); exit(EXIT_SUCCESS); }
pgpOe9J4WR0YH.pgp
Description: PGP signature
_______________________________________________ uClibc mailing list uClibc@uclibc.org http://busybox.net/cgi-bin/mailman/listinfo/uclibc