cvs commit: patches/util-linux util-linux-2.12a-minix-gcc35-1.patch

tushar at linuxfromscratch.org tushar at linuxfromscratch.org
Fri May 21 22:17:20 PDT 2004


tushar      04/05/21 23:17:20

  Added:       util-linux util-linux-2.12a-minix-gcc35-1.patch
  Log:
  Added: util-linux-2.12a-minix-gcc35-1.patch
  
  Revision  Changes    Path
  1.1                  patches/util-linux/util-linux-2.12a-minix-gcc35-1.patch
  
  Index: util-linux-2.12a-minix-gcc35-1.patch
  ===================================================================
  Submitted By: Uwe Düffert (lfs at uwe-dueffert dot de)
  Date: 2004-05-15
  Initial Package Version: 2.12a
  Origin: self-created, http://www.uwe-dueffert.de/lfs/ownpatches/util-linux-2.12a-minix-gcc35-1.patch
  Upstream Status: not reported
  Description: fix minix to compile with gcc35 (invalid lvalue)
   
  diff -Naur util-linux-2.12a.orig/disk-utils/mkfs.minix.c util-linux-2.12a/disk-utils/mkfs.minix.c
  --- util-linux-2.12a.orig/disk-utils/mkfs.minix.c	2002-10-25 22:25:15.000000000 +0000
  +++ util-linux-2.12a/disk-utils/mkfs.minix.c	2004-05-15 12:33:59.124125984 +0000
  @@ -128,17 +128,17 @@
   static char super_block_buffer[BLOCK_SIZE];
   static char boot_block_buffer[512];
   #define Super (*(struct minix_super_block *)super_block_buffer)
  -#define INODES ((unsigned long)Super.s_ninodes)
  +#define INODES (Super.s_ninodes)
   #ifdef HAVE_MINIX2
  -#define ZONES ((unsigned long)(version2 ? Super.s_zones : Super.s_nzones))
  +#define ZONES (version2 ? Super.s_zones : Super.s_nzones)
   #else
  -#define ZONES ((unsigned long)(Super.s_nzones))
  +#define ZONES (Super.s_nzones)
   #endif
  -#define IMAPS ((unsigned long)Super.s_imap_blocks)
  -#define ZMAPS ((unsigned long)Super.s_zmap_blocks)
  -#define FIRSTZONE ((unsigned long)Super.s_firstdatazone)
  -#define ZONESIZE ((unsigned long)Super.s_log_zone_size)
  -#define MAXSIZE ((unsigned long)Super.s_max_size)
  +#define IMAPS (Super.s_imap_blocks)
  +#define ZMAPS (Super.s_zmap_blocks)
  +#define FIRSTZONE (Super.s_firstdatazone)
  +#define ZONESIZE (Super.s_log_zone_size)
  +#define MAXSIZE (Super.s_max_size)
   #define MAGIC (Super.s_magic)
   #define NORM_FIRSTZONE (2+IMAPS+ZMAPS+INODE_BLOCKS)
   
  @@ -475,7 +475,12 @@
   	MAGIC = magic;
   	ZONESIZE = 0;
   	MAXSIZE = version2 ? 0x7fffffff : (7+512+512*512)*1024;
  -	ZONES = BLOCKS;
  +	
  +#ifdef HAVE_MINIX2
  +        if (version2) Super.s_zones = BLOCKS; else Super.s_nzones = BLOCKS;
  +#else
  +        Super.s_nzones = BLOCKS;
  +#endif
   
   /* some magic nrs: 1 inode / 3 blocks */
   	if ( req_nr_inodes == 0 ) 
  
  
  



More information about the patches mailing list