From 919994abc0272f303d5c3388de849a12391baa26 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Fri, 25 Jun 2004 00:52:08 -0400 Subject: [PATCH] setflags.c, fsetflags.c: On linux systems, undefine HAVE_CHFLAGS to deal with lame glibc's that define this function without actually implementing it. Can you say "attractive nuisance", boys and girls? I knew you could! (Thanks to Pavel Troller for reporting this braindamage.) --- lib/e2p/ChangeLog | 8 ++++++++ lib/e2p/fsetflags.c | 9 +++++++++ lib/e2p/setflags.c | 9 +++++++++ 3 files changed, 26 insertions(+) diff --git a/lib/e2p/ChangeLog b/lib/e2p/ChangeLog index d5c04e8..abd73f6 100644 --- a/lib/e2p/ChangeLog +++ b/lib/e2p/ChangeLog @@ -1,3 +1,11 @@ +2004-06-04 Theodore Ts'o + + * setflags.c, fsetflags.c: On linux systems, undefine HAVE_CHFLAGS + to deal with lame glibc's that define this function + without actually implementing it. Can you say "attractive + nuisance", boys and girls? I knew you could! (Thanks to + Pavel Troller for reporting this braindamage.) + 2004-02-29 Brian Bergstrand * Makefile.in: Use $(BSDLIB_PIC_FLAG) to determine whether to use diff --git a/lib/e2p/fsetflags.c b/lib/e2p/fsetflags.c index 8b2eed4..2f1277f 100644 --- a/lib/e2p/fsetflags.c +++ b/lib/e2p/fsetflags.c @@ -32,6 +32,15 @@ #include "e2p.h" +/* + * Deal with lame glibc's that define this function without actually + * implementing it. Can you say "attractive nuisance", boys and girls? + * I knew you could! + */ +#ifdef __linux__ +#undef HAVE_CHFLAGS +#endif + #ifdef O_LARGEFILE #define OPEN_FLAGS (O_RDONLY|O_NONBLOCK|O_LARGEFILE) #else diff --git a/lib/e2p/setflags.c b/lib/e2p/setflags.c index 1693035..47c52a7 100644 --- a/lib/e2p/setflags.c +++ b/lib/e2p/setflags.c @@ -25,6 +25,15 @@ #include "e2p.h" +/* + * Deal with lame glibc's that define this function without actually + * implementing it. Can you say "attractive nuisance", boys and girls? + * I knew you could! + */ +#ifdef __linux__ +#undef HAVE_CHFLAGS +#endif + int setflags (int fd, unsigned long flags) { struct stat buf; -- 1.8.3.1