/* All these functions share this buffer */
-static uint8_t msg_buffer[MAXMESSAGESIZE - OLSR_HEADERSIZE];
+static uint32_t msg_buffer_align[(MAXMESSAGESIZE - OLSR_HEADERSIZE)/sizeof(uint32_t) + 1];
+static uint8_t *msg_buffer = (uint8_t *)msg_buffer_align;
static clock_t send_empty_tc; /* TC empty message sending */
bool lq_tc_pending = false;
-static unsigned char msg_buffer[MAXMESSAGESIZE - OLSR_HEADERSIZE];
+static uint32_t msg_buffer_aligned[(MAXMESSAGESIZE - OLSR_HEADERSIZE) / sizeof(uint32_t) + 1];
+static unsigned char *msg_buffer = (unsigned char *)msg_buffer_aligned;
static void
create_lq_hello(struct lq_hello_message *lq_hello, struct interface *outif)
}
fromlen = sizeof(struct sockaddr_storage);
- cc = olsr_recvfrom(fd, inbuf, sizeof(inbuf), 0, (struct sockaddr *)&from, &fromlen);
+ cc = olsr_recvfrom(fd, inbuf, sizeof(inbuf_aligned), 0, (struct sockaddr *)&from, &fromlen);
if (cc <= 0) {
if (cc < 0 && errno != EWOULDBLOCK) {