fix vsftpd build with gcc-4.1.2 (closes: #1475, partially closes: #1460)
authorNicolas Thill <nico@openwrt.org>
Mon, 19 Mar 2007 01:53:35 +0000 (01:53 +0000)
committerNicolas Thill <nico@openwrt.org>
Mon, 19 Mar 2007 01:53:35 +0000 (01:53 +0000)
SVN-Revision: 6610

net/vsftpd/patches/005-exit_status_const.patch [new file with mode: 0644]

diff --git a/net/vsftpd/patches/005-exit_status_const.patch b/net/vsftpd/patches/005-exit_status_const.patch
new file mode 100644 (file)
index 0000000..c368aac
--- /dev/null
@@ -0,0 +1,27 @@
+Fix errors below when built with gcc-4.1.2
+
+sysutil.c: In function 'vsf_sysutil_wait_exited_normally':
+sysutil.c:604: error: assignment of read-only member '__in'
+sysutil.c: In function 'vsf_sysutil_wait_get_exitcode':
+sysutil.c:614: error: assignment of read-only member '__in'
+
+--- vsftpd-2.0.4-old/sysutil.c
++++ vsftpd-2.0.4-new/sysutil.c
+@@ -601,7 +601,7 @@
+ vsf_sysutil_wait_exited_normally(
+   const struct vsf_sysutil_wait_retval* p_waitret)
+ {
+-  return WIFEXITED(p_waitret->exit_status);
++  return WIFEXITED(((struct vsf_sysutil_wait_retval *)p_waitret)->exit_status);
+ }
+ int
+@@ -611,7 +611,7 @@
+   {
+     bug("not a normal exit in vsf_sysutil_wait_get_exitcode");
+   }
+-  return WEXITSTATUS(p_waitret->exit_status);
++  return WEXITSTATUS(((struct vsf_sysutil_wait_retval *)p_waitret)->exit_status);
+ }
+ void