openbsd-ports/net/dnsmasq/patches/patch-src_tftp_c
jasper 4dee02fc1d - update to 2.58
from brad
2011-09-07 10:34:26 +00:00

34 lines
1.0 KiB
Plaintext

$OpenBSD: patch-src_tftp_c,v 1.10 2011/09/07 10:34:26 jasper Exp $
gcc2 fixes to struct errmess, struct oackmess, struct datamess
--- src/tftp.c.orig Tue Aug 9 08:41:48 2011
+++ src/tftp.c Mon Aug 29 17:35:40 2011
@@ -611,7 +611,7 @@ static ssize_t tftp_err(int err, char *packet, char *m
{
struct errmess {
unsigned short op, err;
- char message[];
+ char message[0];
} *mess = (struct errmess *)packet;
ssize_t ret = 4;
char *errstr = strerror(errno);
@@ -638,7 +638,7 @@ static ssize_t get_block(char *packet, struct tftp_tra
char *p;
struct oackmess {
unsigned short op;
- char data[];
+ char data[0];
} *mess = (struct oackmess *)packet;
p = mess->data;
@@ -661,7 +661,7 @@ static ssize_t get_block(char *packet, struct tftp_tra
/* send data packet */
struct datamess {
unsigned short op, block;
- unsigned char data[];
+ unsigned char data[0];
} *mess = (struct datamess *)packet;
size_t size = transfer->file->size - transfer->offset;