Workaround missing ALIGN() macro

XT_ALIGN() calls ALIGN macro but ALIGN is in kernel source not userspace.
This commit is contained in:
Stephen Hemminger 2010-03-29 15:17:48 -07:00
parent 8881ece54f
commit 609ceb807d
1 changed files with 5 additions and 0 deletions

View File

@ -39,6 +39,11 @@
# define XT_LIB_DIR "/lib/xtables"
#endif
#ifndef ALIGN
#define ALIGN(x,a) __ALIGN_MASK(x,(typeof(x))(a)-1)
#define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask))
#endif
static const char *tname = "mangle";
char *lib_dir;