34 lines
1.0 KiB
Plaintext
34 lines
1.0 KiB
Plaintext
$OpenBSD: patch-src_tftp_c,v 1.9 2011/03/06 11:19:53 sthen Exp $
|
|
|
|
gcc2 fixes to struct errmess, struct oackmess, struct datamess from kili
|
|
|
|
--- src/tftp.c.orig Tue Jan 18 17:23:57 2011
|
|
+++ src/tftp.c Tue Feb 15 19:11:50 2011
|
|
@@ -606,7 +606,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);
|
|
@@ -633,7 +633,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;
|
|
@@ -656,7 +656,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;
|