Heitor Ricardo Alves de Siqueira <hal...@linux.vnet.ibm.com> writes:

> The use of gzclose_r() may break some builds depending on the version of zlib
> that is being used. Since that function is identical to gzclose() apart from
> some differences in static code linkage, we can swap them without any changes 
> to
> program behaviour.

Thanks,

gzclose_r breaks the build for RHEL6.x, since it has an old version of
zlib which doesn't implement gzclose_r.  gzclose fixes the problem for
RHEL6 and works for recent distros.

Brian, This looks good to go.

Reviewed-by: Gabriel Krisman Bertazi <kris...@linux.vnet.ibm.com>

>
> Signed-off-by: Heitor Ricardo Alves de Siqueira <hal...@linux.vnet.ibm.com>
> ---
>  iprconfig.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/iprconfig.c b/iprconfig.c
> index a6b1372e9a67..3f1c086aa431 100644
> --- a/iprconfig.c
> +++ b/iprconfig.c
> @@ -12337,7 +12337,7 @@ int ibm_storage_log(i_container *i_con)
>
>                       write(log_fd, line, strlen(line));
>               }
> -             gzclose_r(logsource_fp);
> +             gzclose(logsource_fp);
>               dirent++;
>       }
>
> @@ -12414,7 +12414,7 @@ int kernel_log(i_container *i_con)
>
>               while (gzgets(logsource_fp, line, sizeof(line)))
>                       write(log_fd, line, strlen(line));
> -             gzclose_r(logsource_fp);
> +             gzclose(logsource_fp);
>               dirent++;
>       }
>
> @@ -12496,7 +12496,7 @@ int iprconfig_log(i_container *i_con)
>                               continue;
>                       write(log_fd, line, strlen(line));
>               }
> -             gzclose_r(logsource_fp);
> +             gzclose(logsource_fp);
>               dirent++;
>       }

-- 
Gabriel Krisman Bertazi


------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785471&iu=/4140
_______________________________________________
Iprdd-devel mailing list
Iprdd-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iprdd-devel

Reply via email to