Hi Eric,

Eric Blake <e...@byu.net> writes:

> The circle was:
> ./getopt.h did include_next <getopt.h>
>  <getopt.h> did include <unistd.h>, but found ./unistd.h
>   ./unistd.h did include_next <unistd.h>
>   <unistd.h> completed
>   ./unistd.h did include <getopt.h>, and found ./getopt.h
>    ./getopt.h declared things
>   ./unistd.h completed
>  <getopt.h> redeclared things
>
> The solution is to teach ./unistd.h to skip <getopt.h> if the system
> <getopt.h> was the guy including unistd.  That way, both the system
> <getopt.h> and <unistd.h> can run to completion prior to ./getopt.h
> declaring overrides.
>
> I will be pushing this, if further testing proves that it doesn't break
> Linux or FreeBSD.

Thanks for the quick reply and patch!

It now builds properly on GNU/Linux, Darwin, and Cygwin in NixOS/Nixpkgs
(see latest builds at http://hydra.nixos.org/job/nixpkgs/stdenv/gzip/all).

Ludo’.


Reply via email to