SOURCES: par2cmdline-gcc41.patch - mark uint64 fields as packed to...

pluto pluto at pld-linux.org
Fri Jan 13 10:44:24 CET 2006


Author: pluto                        Date: Fri Jan 13 09:44:23 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- mark uint64 fields as packed to avoid natual struct alignment
  which rounds up structs size to 8 bytes.

---- Files affected:
SOURCES:
   par2cmdline-gcc41.patch (1.2 -> 1.3) 

---- Diffs:

================================================================
Index: SOURCES/par2cmdline-gcc41.patch
diff -u SOURCES/par2cmdline-gcc41.patch:1.2 SOURCES/par2cmdline-gcc41.patch:1.3
--- SOURCES/par2cmdline-gcc41.patch:1.2	Thu Jan 12 21:12:26 2006
+++ SOURCES/par2cmdline-gcc41.patch	Fri Jan 13 10:44:18 2006
@@ -29,7 +29,12 @@
  {
 --- par2cmdline-0.4/par2fileformat.h.orig	2003-08-01 23:43:40.000000000 +0000
 +++ par2cmdline-0.4/par2fileformat.h	2005-11-04 10:36:03.149880032 +0000
-@@ -67,7 +67,7 @@
+@@ -63,11 +63,11 @@
+ {
+   // Header
+   MAGIC            magic;  // = {'P', 'A', 'R', '2', '\0', 'P', 'K', 'T'}
+-  leu64            length; // Length of entire packet including header
++  leu64            length PACKED; // Length of entire packet including header
    MD5Hash          hash;   // Hash of entire packet excepting the first 3 fields
    MD5Hash          setid;  // Normally computed as the Hash of body of "Main Packet"
    PACKETTYPE       type;   // Used to specify the meaning of the rest of the packet
@@ -64,7 +69,13 @@
  
  // The main packet is used to tie together the other packets in a recovery file.
  // It specifies the block size used to virtually slice the source files, a count
-@@ -131,7 +131,7 @@
+@@ -126,12 +126,12 @@
+ {
+   PACKET_HEADER    header;
+   // Body
+-  leu64            blocksize;
++  leu64            blocksize PACKED;
+   leu32            recoverablefilecount;
    MD5Hash          fileid[0];
    //MD5Hash* fileid(void) {return (MD5Hash*)&this[1];}
    //const MD5Hash* fileid(void) const {return (const MD5Hash*)&this[1];}
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/par2cmdline-gcc41.patch?r1=1.2&r2=1.3&f=u



More information about the pld-cvs-commit mailing list