From: mglocker Date: Tue, 26 Aug 2008 21:52:48 +0000 (+0000) Subject: Fix alignment panic on sparc64 by removing a wrong __packed. While X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=48ae767de2de9d8c58d61b02eb91efc09946a3de;p=openbsd Fix alignment panic on sparc64 by removing a wrong __packed. While there reorder fields in the struct to make it shorter on 64 bit archs. panic reported by jasper@ thanks to miod@ for helping me debug this down --- diff --git a/sys/dev/usb/uvideo.h b/sys/dev/usb/uvideo.h index f8c226183a1..cbef8613f55 100644 --- a/sys/dev/usb/uvideo.h +++ b/sys/dev/usb/uvideo.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uvideo.h,v 1.29 2008/08/24 11:43:00 mglocker Exp $ */ +/* $OpenBSD: uvideo.h,v 1.30 2008/08/26 21:52:48 mglocker Exp $ */ /* * Copyright (c) 2007 Robert Nagy @@ -452,14 +452,14 @@ struct uvideo_format_desc { struct uvideo_format_group { uint32_t pixelformat; - struct uvideo_format_desc *format; uint8_t format_dfidx; + struct uvideo_format_desc *format; /* frame descriptors for mjpeg and uncompressed are identical */ #define UVIDEO_MAX_FRAME 16 - int frame_num; struct usb_video_frame_mjpeg_desc *frame_cur; struct usb_video_frame_mjpeg_desc *frame[UVIDEO_MAX_FRAME]; -} __packed; + int frame_num; +}; struct uvideo_res { int width;