[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Coreutils 6.7 build error and patch
From: |
Jim Meyering |
Subject: |
Re: Coreutils 6.7 build error and patch |
Date: |
Mon, 12 Feb 2007 18:51:46 +0100 |
VinX <address@hidden> wrote:
> I'd a little problem with this version, it didn't compile.
> The error is:
> ---
> gcc -std=gnu99 -I. -g -O2 -MT utimens.o -MD -MP -MF .deps/utimens.Tpo
> -c -o utimens.o utimens.c
> utimens.c: In function `futimens':
> utimens.c:117: warning: implicit declaration of function `futimesat'
> utimens.c:117: error: `AT_FDCWD' undeclared (first use in this function)
> utimens.c:117: error: (Each undeclared identifier is reported only once
> utimens.c:117: error: for each function it appears in.)
> make[2]: *** [utimens.o] Error 1
...
> diff -ruNp coreutils-6.7/lib/chdir-long.c coreutils-6.7-VinX/lib/chdir-long.c
> --- coreutils-6.7/lib/chdir-long.c 2006-09-14 11:53:58.000000000 +0200
> +++ coreutils-6.7-VinX/lib/chdir-long.c 2007-02-12 16:02:31.000000000
> +0100
> @@ -21,6 +21,7 @@
>
> #include "chdir-long.h"
>
> +#define __USE_ATFILE
Thanks for the patch, but each module/application should not define
__USE_ATFILE. Rather, you'd expect it to be defined via e.g., features.h,
when _GNU_SOURCE is defined (which it is, for coreutils).
In fact, I see this in upstream glibc's include/features.h:
#ifdef _GNU_SOURCE
...
# undef _ATFILE_SOURCE
# define _ATFILE_SOURCE 1
#endif
...
#ifdef _ATFILE_SOURCE
# define __USE_ATFILE 1
#endif