From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,3416ea20d6a82e13 X-Google-Attributes: gid111c93,public From: Tom Michiels Subject: Re: unaligned trap help Date: 1998/12/17 Message-ID: <913892314.564529@marvin>#1/1 X-Deja-AN: 423210018 Cache-Post-Path: marvin!tomm@godard.cs.kuleuven.ac.be Content-Transfer-Encoding: 8bit References: <8qPBZSm00WB40YO1s0@andrew.cmu.edu> Content-Type: text/plain; charset=iso-8859-1 X-Complaints-To: abuse@belnet.be X-Trace: naxos.belnet.be 913892315 1838 134.58.127.3 (17 Dec 1998 10:58:35 GMT) Organization: KULeuvenNet X-Cache: nntpcache 2.3.2.1 (see http://www.nntpcache.org/) Mime-Version: 1.0 NNTP-Posting-Date: 17 Dec 1998 10:58:35 GMT Newsgroups: comp.os.linux.alpha Timothy K Canfield wrote: > configuring the network using DHCP i recieve unaligned trap. This also I don't know about redhat, but if it uses - like debian - dhcpcd 0.70, then these unaligned traps are caused by long-pointer-casts: u_long foo; u_char *bar; ... foo= *((u_long *) bar); If the char-pointer is not 64-bit aligned, this gives an unaligned access violation. I replaced these instructions by memcpy(&foo,bar,sizeof(long)); to get rid of the unaligned accesses. But this is ofcourse not an optimal way of solving the problem. Aren't there any macros definedto do this type of unaligned long copying? Tom