On Tue, 2011-03-22 at 11:25 +0100, Gabor Z. Papp wrote: > * Karel Zak <kzak@xxxxxxxxxx>: > > | > while trying to compile util-linux 2.19 on linux kernel 2.4, glibc > | > 2.2, getting the following error: > > | why do you need the latest util-linux for this masochistic setup? > | :-) > > masochistic is the keyword :-) > > | This has been fixed by commit eb76ca98b0733754d7e9a40f754e89b50af2bf06. > [...] > | This has been fixed by commit 4799c95f943bd947c02f754da121974b4b34697d. > > | ... both issues will be fixed in v2.19.1. Thanks. > > Thanks. Compiled cleanly. > > New one: > > make[2]: Entering directory `/home/gzp/src/util-linux/login-utils' > CC checktty_test-checktty.o > checktty.c: In function 'main': > checktty.c:315: error: 'AI_ADDRCONFIG' undeclared (first use in this function) > checktty.c:315: error: (Each undeclared identifier is reported only once > checktty.c:315: error: for each function it appears in.) > make[2]: *** [checktty_test-checktty.o] Error 1 > > Its defined on glibc 2.3 as "#define AI_ADDRCONFIG 0x0020" in > netdb.h, but seems like not in 2.2. > > Another: > > Maybe schedutils could be removed from the targets while compiling on > glibc 2.2/2.3: > > Making all in schedutils > make[2]: Entering directory `/home/gzp/src/util-linux/schedutils' > CC chrt.o > CC strutils.o > CCLD chrt > CC ionice.o > CCLD ionice > CC taskset.o > In file included from taskset.c:28: > ../include/cpuset.h:51: warning: type defaults to 'int' in declaration of 'cpu_set_t' > ../include/cpuset.h:51: error: expected ';', ',' or ')' before '*' token > ../include/cpuset.h:66: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token > ../include/cpuset.h:67: error: expected ')' before '*' token > ../include/cpuset.h:69: error: expected declaration specifiers or '...' before 'cpu_set_t' > > My bad, just checked I could use --disable-schedutils :-) > > Another one: > > make[2]: Entering directory `/home/gzp/src/util-linux/sys-utils' > CC ldattach.o > ldattach.c:95: error: 'IUTF8' undeclared here (not in a function) > make[2]: *** [ldattach.o] Error 1 > > glibc 2.3 defines it, but 2.2 lack of IUTF8. > > bits/termios.h:#define IUTF8 0040000 > > Another: > > Making all in partx > make[2]: Entering directory `/home/gzp/src/util-linux/partx' > CC addpart.o > CCLD addpart > CC delpart.o > CCLD delpart > CC partx-partx.o > partx.c: In function 'get_max_partno': > partx.c:217: warning: implicit declaration of function 'openat' That's because openat(2) was included in 2.6.16 and you're using 2.4 (again, masochist is the perfect word :) The patch below fixes the AI_ADDRCONFIG and IUTF8 macros for c.h >From 75d52d2e301c4eeb4701fb645005af9c17d92553 Mon Sep 17 00:00:00 2001 From: Davidlohr Bueso <dave@xxxxxxx> Date: Tue, 22 Mar 2011 10:39:44 -0300 Subject: [PATCH] include: [c.h] add definition wrappers for old libc versions Signed-off-by: Davidlohr Bueso <dave@xxxxxxx> --- include/c.h | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/include/c.h b/include/c.h index 3e5d415..51cbbb2 100644 --- a/include/c.h +++ b/include/c.h @@ -195,9 +195,17 @@ prog_inv_sh_nm_from_file(char *f, char stripext) # endif #endif -/* very old glibc (2.3) */ +/* very old glibc (2.x) */ #ifndef O_CLOEXEC #define O_CLOEXEC 0 #endif +#ifndef AI_ADDRCONFIG +#define AI_ADDRCONFIG 0x0020 +#endif + +#ifndef IUTF8 +#define IUTF8 0040000 +#endif + #endif /* UTIL_LINUX_C_H */ -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html