--- src/simulavr-0.1.2.6/src/intvects.h.old 2011-04-13 02:26:29.000000000 +0000
+++ src/simulavr-0.1.2.6/src/intvects.h 2011-04-13 02:27:37.000000000 +0000
@@ -26,6 +26,8 @@
#ifndef SIM_INTVECTS_H
#define SIM_INTVECTS_H
+#include <stddef.h>
+
enum _sleep_modes
{
SLEEP_MODE_IDLE,
@@ -83,7 +85,7 @@ struct _IntVect
an index enumeration. */
#define irq_vect_table_index(vect) \
- ( ((unsigned int) (&( ((IntVectTable *)(0)) -> vect))) / sizeof(IntVect) )
+ ( offsetof(IntVectTable, vect) / sizeof(IntVect) )
/* No device will have all of these vectors, but must define a structure which
has a slot for each interrupt. If the device doesn't support the