[Slapt-get-devel] slapt-get fails to compile on slackware-current

Jason Woodward woodwardj at jaos.org
Wed Apr 18 11:02:34 EDT 2012


Hi Igor,

> After recent updates in slackware-current slapt-get fails to compile
> with default CFLAGS:
> ---------------------------------------------------
> # LANG=C make
> cc -W -Werror -Wall -O2 -ansi -pedantic
> -DPACKAGE="\"slapt-get\""
> -DVERSION="\"0.10.2m\""
> -DRC_LOCATION="\"/etc/slapt-get/slapt-getrc\""
> -DENABLE_NLS
> -DPACKAGE_LOCALE_DIR="\"/usr/share/locale\""
> -DGETTEXT_PACKAGE="\"slapt-get\"" -DSLAPT_HAS_GPGME
> -fPIC -c -o src/common.o src/common.c
> cc -W -Werror -Wall -O2 -ansi -pedantic
> -DPACKAGE="\"slapt-get\""
> -DVERSION="\"0.10.2m\""
> -DRC_LOCATION="\"/etc/slapt-get/slapt-getrc\""
> -DENABLE_NLS
> -DPACKAGE_LOCALE_DIR="\"/usr/share/locale\""
> -DGETTEXT_PACKAGE="\"slapt-get\"" -DSLAPT_HAS_GPGME
> -fPIC -c -o src/configuration.o src/configuration.c
> cc -W -Werror -Wall -O2 -ansi -pedantic
> -DPACKAGE="\"slapt-get\""
> -DVERSION="\"0.10.2m\""
> -DRC_LOCATION="\"/etc/slapt-get/slapt-getrc\""
> -DENABLE_NLS
> -DPACKAGE_LOCALE_DIR="\"/usr/share/locale\""
> -DGETTEXT_PACKAGE="\"slapt-get\"" -DSLAPT_HAS_GPGME
> -fPIC -c -o src/package.o src/package.c
> src/package.c: In function 'slapt_gunzip_file':
> src/package.c:2644:13: error: assignment from incompatible pointer type
> [-Werror]
> src/package.c:2647:3: error: passing argument 1 of 'gzgets' from
> incompatible pointer type [-Werror]
> In file included from src/main.h:40:0,
>		 from src/package.c:19:
> /usr/include/zlib.h:1349:24: note: expected 'gzFile' but argument is of
> type 'struct gzFile_s **'
> src/package.c:2650:3: error: passing argument 1 of 'gzclose' from
> incompatible pointer type [-Werror]
> In file included from src/main.h:40:0,
>		 from src/package.c:19:
> /usr/include/zlib.h:1488:24: note: expected 'gzFile' but argument is of
> type 'struct gzFile_s **'
> cc1: all warnings being treated as errors
> make: *** [src/package.o] Error 1
> ---------------------------------------------------
> 
> The same warnings are shown during slapt-src compilation.

Does this fix the problem?

--- a/src/package.c
+++ b/src/package.c
@@ -2634,7 +2634,7 @@ void slapt_free_pkg_err_list(slapt_pkg_err_list_t *l)

 /* FIXME this sucks... it needs to check file headers and more */
 static FILE *slapt_gunzip_file (const char *file_name,FILE *dest_file)
 {
-  gzFile *data = NULL;
+  gzFile data = NULL;
   char buffer[SLAPT_MAX_ZLIB_BUFFER];
 
   if (dest_file == NULL)


take care,
jason
--
Jason Woodward


More information about the Slapt-get-devel mailing list