Messages in this thread | | | From | "Alan Curry" <> | Subject | Re: Writing to busy binaries? | Date | Thu, 13 May 1999 02:24:08 -0500 (EST) |
| |
I just looked at <linux/genhd.h> (2.0.36) and it has __attributte((packed)) which I think is the right way to spell it in unadorned c. The partition struct was invented for the 8 bit pc, which had no notion of word alignment, so that is trying to tell the compiler not to insert slack bytes to make the words line up. Since it is 8 unsigned char followed by 2 unsigned int, it does line up, but if you look at a partition record you will see that the struct is misaligned within the record. Where did you get your kernel headers? :-)
Oh, tar -tbzf was a typo, of course, I meant tvzf.
Lawson >< Microsoft free environment
This mail client runs on Wine. Your mileage may vary.
On Wed, 12 May 1999, Brian Geisel wrote:
> Greetings, > I've been compiling some programs for quite some time that have had > problems with one of the kernel header files, genhd.h. They use the > partition structure which used to look like this: > > struct partition { yada yada } __((packed))__; > > and the compiler freaked out and had (I think) a parse error before the ;. > Now the new versions (of the kernel) have replaced the __((packed))__ with > ((packed)). I get multiply defined symbol 'packed' in every source file > that includes that file. Can anyone tell me what's going on. What is gcc > trying to do, and why might it not be doing it. > > I am using 2.8.1, but was having similar if not identical problems with > 2.7.2.3. > > TIA > > geisel >
___________________________________________________________________ You don't need to buy Internet access to use free Internet e-mail. Get completely free e-mail from Juno at http://www.juno.com/getjuno.html or call Juno at (800) 654-JUNO [654-5866]
| |