* util.c (get_compression_type): Cast magic to char * to
fix compilation on AIX.
Этот коммит содержится в:
родитель
14a6ef141c
Коммит
b25dd0a948
@ -1,6 +1,8 @@
|
|||||||
2003-01-27 Andrew V. Samoilov <sav@bcs.zp.ua>
|
2003-01-27 Andrew V. Samoilov <sav@bcs.zp.ua>
|
||||||
|
|
||||||
* util.h (app_text): Remove declaration - it became static.
|
* util.h (app_text): Remove declaration - it became static.
|
||||||
|
* util.c (get_compression_type): Cast magic to char * to
|
||||||
|
fix compilation on AIX.
|
||||||
* mountlist.c (read_filesystem_list) [MOUNTED_GETMNTENT1]:
|
* mountlist.c (read_filesystem_list) [MOUNTED_GETMNTENT1]:
|
||||||
Check for MOUNTED is defined to fix compilation on AIX.
|
Check for MOUNTED is defined to fix compilation on AIX.
|
||||||
Reported by Alexander Varakin <avarakin00@hotmail.com>.
|
Reported by Alexander Varakin <avarakin00@hotmail.com>.
|
||||||
|
@ -859,7 +859,7 @@ int get_compression_type (int fd)
|
|||||||
unsigned char magic[4];
|
unsigned char magic[4];
|
||||||
|
|
||||||
/* Read the magic signature */
|
/* Read the magic signature */
|
||||||
if (mc_read (fd, &magic[0], 4) != 4)
|
if (mc_read (fd, (char *) magic, 4) != 4)
|
||||||
return COMPRESSION_NONE;
|
return COMPRESSION_NONE;
|
||||||
|
|
||||||
/* GZIP_MAGIC and OLD_GZIP_MAGIC */
|
/* GZIP_MAGIC and OLD_GZIP_MAGIC */
|
||||||
@ -872,7 +872,7 @@ int get_compression_type (int fd)
|
|||||||
&& magic[3] == 004) {
|
&& magic[3] == 004) {
|
||||||
/* Read compression type */
|
/* Read compression type */
|
||||||
mc_lseek (fd, 8, SEEK_SET);
|
mc_lseek (fd, 8, SEEK_SET);
|
||||||
if (mc_read (fd, &magic[0], 2) != 2)
|
if (mc_read (fd, (char *) magic, 2) != 2)
|
||||||
return COMPRESSION_NONE;
|
return COMPRESSION_NONE;
|
||||||
|
|
||||||
/* Gzip can handle only deflated (8) or stored (0) files */
|
/* Gzip can handle only deflated (8) or stored (0) files */
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user