bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gftp: FTBFS on hurd-i386: fatal error: stropts.h: No such file or di


From: Jessica Clarke
Subject: Re: gftp: FTBFS on hurd-i386: fatal error: stropts.h: No such file or directory
Date: Sun, 9 May 2021 18:37:28 +0100

On 9 May 2021, at 14:56, hahawang <hahwang@yandex.com> wrote:
> 
> Package: gftp
> Severity: important
> Version: 2.7.0b-1
> Tags: ftbfs,patch
> User:hahawang
> Usertags: hurd,hurd-i386
> X-Debbugs-CC:debian-hurd@lists.debian.org,bug-hurd@gnu.org
> 
> I decide to fix a broken package found at the recommended 
> page(https://people.debian.org/~sthibault/out_of_date.txt)named `gftp`.
> 
> After I download the package source and try to build without any 
> modifications under the debian hurd running in qemu 
> (debian-hurd-20210219.img),  I got the following error.
> 
> ```
> 
> pty.c:64:10: fatal error: stropts.h: No such file or directory
>    64 | #include <stropts.h>
>       |          ^~~~~~~~~~~
> compilation terminated.
> 
> ```
> 
> So that I decide to check the source code and find the following line:
> 
> 
> ```
> 
> #if !(defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__) || 
> defined(__linux__))
> #include <stropts.h>
> #endif
> 
> ```
> 
> Obviously, the GNU Hurd also haven't the `stropt.h`, so It is better to add a 
> check of GNU-hurd at this line. By following the document available at 
> https://sourceforge.net/p/predef/wiki/OperatingSystems/,
> 
> I have fixed the build failure, patches avaiable at the end of this email.
> 
> Although, IMHO it's trivial, so I decide to report this bug along with a 
> patch directly to the debian bug tracking system, but also hopes for your 
> advises and reviews!
> 
> Thank you!
> 
> ---
> 
> hahawang
> 
> 
> --- a/lib/pty.c
> +++ b/lib/pty.c
> @@ -60,7 +60,7 @@
> 
>  #elif HAVE_GRANTPT
> 
> -#if !(defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__) || 
> defined(__linux__))
> +#if !(defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__) || 
> defined(__linux__) || defined(__gnu_hurd__))
>  #include <stropts.h>
>  #endif

Why is this not just #ifdef __sun upstream? AFAIK Solaris is the only OS that
implements that mess. Or, better yet, if it’s optional, just delete the code
that needs this header? Or make it an autoconf check. This is hands down the
worst way upstream could write this code.

Jess




reply via email to

[Prev in Thread] Current Thread [Next in Thread]