Skip to content

Commit

Permalink
executor: fix 32-bit support
Browse files Browse the repository at this point in the history
ipt_get_entries.entrytable must be pointer aligned,
so in 32-bit build there is no padding before it.
  • Loading branch information
dvyukov committed Jan 28, 2018
1 parent 08146b1 commit 08d4775
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions executor/common_linux.h
Expand Up @@ -971,8 +971,7 @@ struct ipt_getinfo {
struct ipt_get_entries {
char name[32];
unsigned int size;
unsigned int pad;
char entrytable[1024];
void* entrytable[1024 / sizeof(void*)];
};

struct xt_counters {
Expand Down
3 changes: 1 addition & 2 deletions pkg/csource/linux_common.go
Expand Up @@ -2003,8 +2003,7 @@ struct ipt_getinfo {
struct ipt_get_entries {
char name[32];
unsigned int size;
unsigned int pad;
char entrytable[1024];
void* entrytable[1024 / sizeof(void*)];
};
struct xt_counters {
Expand Down

0 comments on commit 08d4775

Please sign in to comment.