Skip to content

Commit

Permalink
libknet: make all data packed
Browse files Browse the repository at this point in the history
gcc doesn't propagate packed attribute down to a union

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
  • Loading branch information
fabbione committed Nov 17, 2012
1 parent 2d6a501 commit 8cb92f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libknet/libknet.h
Expand Up @@ -71,12 +71,12 @@ union knet_frame_data {
struct {
seq_num_t kfd_seq_num;
uint8_t kfd_data[0];
} data;
} data __attribute__((packed));
struct {
uint8_t kfd_link;
uint8_t kfd_dyn;
uint32_t kfd_time[4];
} ping;
} ping __attribute__((packed));
} __attribute__((packed));

struct knet_frame {
Expand Down

0 comments on commit 8cb92f5

Please sign in to comment.