diff mbox series

package/ncftp: fix incompatible-pointer-types error

Message ID 20250303144047.268530-1-yegorslists@googlemail.com
State Changes Requested
Headers show
Series package/ncftp: fix incompatible-pointer-types error | expand

Commit Message

Yegor Yefremov March 3, 2025, 2:40 p.m. UTC
From: Yegor Yefremov <yegorslists@googlemail.com>

Use only stat, fstat, and lstat structures for the correspondent calls
and let the C library macros to pick the right structure and call
depending on the supported file size.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
---
 package/ncftp/0003-fix-stat.patch | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 package/ncftp/0003-fix-stat.patch

Comments

Yegor Yefremov March 3, 2025, 2:43 p.m. UTC | #1
On Mon, Mar 3, 2025 at 3:40 PM <yegorslists@googlemail.com> wrote:
>
> From: Yegor Yefremov <yegorslists@googlemail.com>
>
> Use only stat, fstat, and lstat structures for the correspondent calls
> and let the C library macros to pick the right structure and call
> depending on the supported file size.
>
> Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
> ---
>  package/ncftp/0003-fix-stat.patch | 27 +++++++++++++++++++++++++++
>  1 file changed, 27 insertions(+)
>  create mode 100644 package/ncftp/0003-fix-stat.patch
>
> diff --git a/package/ncftp/0003-fix-stat.patch b/package/ncftp/0003-fix-stat.patch
> new file mode 100644
> index 0000000000..8581cf546b
> --- /dev/null
> +++ b/package/ncftp/0003-fix-stat.patch
> @@ -0,0 +1,27 @@
> +Use stat, fstat, and lstat structures and let the C library handle the
> +related structures and system calls.
> +
> +Upstream: N/A, unresponsive contact email address.
> +
> +Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
> +--- a/ncftp/syshdrs.h
> ++++ b/ncftp/syshdrs.h
> +@@ -260,18 +260,6 @@
> + #     define Stat WinStat64
> + #     define Lstat WinStat64
> + #     define Fstat WinFStat64
> +-#elif ((defined(HAVE_LONG_LONG)) && (defined(_LARGEFILE64_SOURCE)) && (defined(HAVE_STAT64)) && (defined(HAVE_STRUCT_STAT64)))
> +-#     define Stat stat64
> +-#     ifdef HAVE_FSTAT64
> +-#             define Fstat fstat64
> +-#     else
> +-#             define Fstat fstat
> +-#     endif
> +-#     ifdef HAVE_LSTAT64
> +-#             define Lstat lstat64
> +-#     else
> +-#             define Lstat lstat
> +-#     endif
> + #else
> + #     define Stat stat
> + #     define Fstat fstat
> --
> 2.34.1

Forgot to add the following line:

Fixes: https://autobuild.buildroot.org/results/a1e0089ec8c6d58f8e991471f601bc304d60de69/
Peter Korsgaard March 3, 2025, 7:49 p.m. UTC | #2
>>>>> "yegorslists" == yegorslists  <yegorslists@googlemail.com> writes:

 > From: Yegor Yefremov <yegorslists@googlemail.com>
 > Use only stat, fstat, and lstat structures for the correspondent calls
 > and let the C library macros to pick the right structure and call
 > depending on the supported file size.

Do we have any autobuilder errors from this?

 > Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
 > ---
 >  package/ncftp/0003-fix-stat.patch | 27 +++++++++++++++++++++++++++
 >  1 file changed, 27 insertions(+)
 >  create mode 100644 package/ncftp/0003-fix-stat.patch

 > diff --git a/package/ncftp/0003-fix-stat.patch b/package/ncftp/0003-fix-stat.patch
 > new file mode 100644
 > index 0000000000..8581cf546b
 > --- /dev/null
 > +++ b/package/ncftp/0003-fix-stat.patch
 > @@ -0,0 +1,27 @@
 > +Use stat, fstat, and lstat structures and let the C library handle the
 > +related structures and system calls.
 > +
 > +Upstream: N/A, unresponsive contact email address.

If upstream is dead, perhaps we should instead drop the ncftp package
given how little FTP is used nowadays?
Julien Olivain March 25, 2025, 10:01 p.m. UTC | #3
Hi Peter, Yegor,

On 03/03/2025 20:49, Peter Korsgaard wrote:
>>>>>> "yegorslists" == yegorslists  <yegorslists@googlemail.com> writes:
> 
>  > From: Yegor Yefremov <yegorslists@googlemail.com>
>  > Use only stat, fstat, and lstat structures for the correspondent 
> calls
>  > and let the C library macros to pick the right structure and call
>  > depending on the supported file size.
> 
> Do we have any autobuilder errors from this?
> 
>  > Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
>  > ---
>  >  package/ncftp/0003-fix-stat.patch | 27 +++++++++++++++++++++++++++
>  >  1 file changed, 27 insertions(+)
>  >  create mode 100644 package/ncftp/0003-fix-stat.patch
> 
>  > diff --git a/package/ncftp/0003-fix-stat.patch 
> b/package/ncftp/0003-fix-stat.patch
>  > new file mode 100644
>  > index 0000000000..8581cf546b
>  > --- /dev/null
>  > +++ b/package/ncftp/0003-fix-stat.patch
>  > @@ -0,0 +1,27 @@
>  > +Use stat, fstat, and lstat structures and let the C library handle 
> the
>  > +related structures and system calls.
>  > +
>  > +Upstream: N/A, unresponsive contact email address.
> 
> If upstream is dead, perhaps we should instead drop the ncftp package
> given how little FTP is used nowadays?

It seems there was a new upstream release, after all. See:
https://www.ncftp.com/ncftp/doc/changelog.html

Yegor, could you have a look if this new release fixes
the same issue. And if so, could you send a new patch
that just bump to this new version, please?

Best regards,

Julien.
Yegor Yefremov March 25, 2025, 10:17 p.m. UTC | #4
Hi Julien,

On Tue, Mar 25, 2025 at 11:01 PM Julien Olivain <ju.o@free.fr> wrote:
>
> Hi Peter, Yegor,
>
> On 03/03/2025 20:49, Peter Korsgaard wrote:
> >>>>>> "yegorslists" == yegorslists  <yegorslists@googlemail.com> writes:
> >
> >  > From: Yegor Yefremov <yegorslists@googlemail.com>
> >  > Use only stat, fstat, and lstat structures for the correspondent
> > calls
> >  > and let the C library macros to pick the right structure and call
> >  > depending on the supported file size.
> >
> > Do we have any autobuilder errors from this?
> >
> >  > Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
> >  > ---
> >  >  package/ncftp/0003-fix-stat.patch | 27 +++++++++++++++++++++++++++
> >  >  1 file changed, 27 insertions(+)
> >  >  create mode 100644 package/ncftp/0003-fix-stat.patch
> >
> >  > diff --git a/package/ncftp/0003-fix-stat.patch
> > b/package/ncftp/0003-fix-stat.patch
> >  > new file mode 100644
> >  > index 0000000000..8581cf546b
> >  > --- /dev/null
> >  > +++ b/package/ncftp/0003-fix-stat.patch
> >  > @@ -0,0 +1,27 @@
> >  > +Use stat, fstat, and lstat structures and let the C library handle
> > the
> >  > +related structures and system calls.
> >  > +
> >  > +Upstream: N/A, unresponsive contact email address.
> >
> > If upstream is dead, perhaps we should instead drop the ncftp package
> > given how little FTP is used nowadays?
>
> It seems there was a new upstream release, after all. See:
> https://www.ncftp.com/ncftp/doc/changelog.html
>
> Yegor, could you have a look if this new release fixes
> the same issue. And if so, could you send a new patch
> that just bump to this new version, please?

I am on it. The issue with large file support is fixed now. But
autoreconf is now broken. Though, cross-compilation for ARM is working
with the configure scriüt alone.

Regards,
Yegor
diff mbox series

Patch

diff --git a/package/ncftp/0003-fix-stat.patch b/package/ncftp/0003-fix-stat.patch
new file mode 100644
index 0000000000..8581cf546b
--- /dev/null
+++ b/package/ncftp/0003-fix-stat.patch
@@ -0,0 +1,27 @@ 
+Use stat, fstat, and lstat structures and let the C library handle the
+related structures and system calls.
+
+Upstream: N/A, unresponsive contact email address.
+
+Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
+--- a/ncftp/syshdrs.h
++++ b/ncftp/syshdrs.h
+@@ -260,18 +260,6 @@
+ #	define Stat WinStat64
+ #	define Lstat WinStat64
+ #	define Fstat WinFStat64
+-#elif ((defined(HAVE_LONG_LONG)) && (defined(_LARGEFILE64_SOURCE)) && (defined(HAVE_STAT64)) && (defined(HAVE_STRUCT_STAT64)))
+-#	define Stat stat64
+-#	ifdef HAVE_FSTAT64
+-#		define Fstat fstat64
+-#	else
+-#		define Fstat fstat
+-#	endif
+-#	ifdef HAVE_LSTAT64
+-#		define Lstat lstat64
+-#	else
+-#		define Lstat lstat
+-#	endif
+ #else
+ #	define Stat stat
+ #	define Fstat fstat