fix vsftpd build with gcc-4.1.2 (closes: #1475, partially closes: #1460)
[openwrt/svn-archive/archive.git] / net / vsftpd / patches / 005-exit_status_const.patch
1 Fix errors below when built with gcc-4.1.2
2
3 sysutil.c: In function 'vsf_sysutil_wait_exited_normally':
4 sysutil.c:604: error: assignment of read-only member '__in'
5 sysutil.c: In function 'vsf_sysutil_wait_get_exitcode':
6 sysutil.c:614: error: assignment of read-only member '__in'
7
8 --- vsftpd-2.0.4-old/sysutil.c
9 +++ vsftpd-2.0.4-new/sysutil.c
10 @@ -601,7 +601,7 @@
11 vsf_sysutil_wait_exited_normally(
12 const struct vsf_sysutil_wait_retval* p_waitret)
13 {
14 - return WIFEXITED(p_waitret->exit_status);
15 + return WIFEXITED(((struct vsf_sysutil_wait_retval *)p_waitret)->exit_status);
16 }
17
18 int
19 @@ -611,7 +611,7 @@
20 {
21 bug("not a normal exit in vsf_sysutil_wait_get_exitcode");
22 }
23 - return WEXITSTATUS(p_waitret->exit_status);
24 + return WEXITSTATUS(((struct vsf_sysutil_wait_retval *)p_waitret)->exit_status);
25 }
26
27 void