summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/libstand/tftp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libstand/tftp.c b/lib/libstand/tftp.c
index 0cbfa52..fd1b4ee 100644
--- a/lib/libstand/tftp.c
+++ b/lib/libstand/tftp.c
@@ -95,10 +95,10 @@ struct tftp_handle {
u_char header[HEADER_SIZE];
struct tftphdr t;
u_char space[RSPACE];
- } lastdata;
+ } __packed __aligned(4) lastdata;
};
-static int tftperrors[8] = {
+static const int tftperrors[8] = {
0, /* ??? */
ENOENT,
EPERM,
@@ -175,7 +175,7 @@ tftp_makereq(h)
u_char header[HEADER_SIZE];
struct tftphdr t;
u_char space[FNAME_SIZE + 6];
- } wbuf;
+ } __packed __aligned(4) wbuf;
char *wtail;
int l;
ssize_t res;
@@ -218,7 +218,7 @@ tftp_getnextblock(h)
struct {
u_char header[HEADER_SIZE];
struct tftphdr t;
- } wbuf;
+ } __packed __aligned(4) wbuf;
char *wtail;
int res;
struct tftphdr *t;
OpenPOWER on IntegriCloud