Hi, Jess
You are right, after I pushed this patch to the upstream repository
and the maintainer merged it.
He gave me an reply saying the `stropts.h` now seemed meaningless
since most major platforms
do not support it, so does GNU Hurd. These lines will be completely
removed in the future.
Thanks for your kind advises.
The original reply message and the issue I have opened is here.
https://github.com/masneyb/gftp/issues/110
---
hahawang
On 2021/5/10 上午1:37, Jessica Clarke wrote:
On 9 May 2021, at 14:56, hahawang <hahw...@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-h...@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