From: Stephen Hemminger Date: Mon, 29 Mar 2010 22:17:48 +0000 (-0700) Subject: Workaround missing ALIGN() macro X-Git-Tag: v2.6.34~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=609ceb807deba8e23455ceca3a1fab3f61b345d1;p=thirdparty%2Fiproute2.git Workaround missing ALIGN() macro XT_ALIGN() calls ALIGN macro but ALIGN is in kernel source not userspace. --- diff --git a/tc/m_xt.c b/tc/m_xt.c index 3972d2d28..bfc49371f 100644 --- a/tc/m_xt.c +++ b/tc/m_xt.c @@ -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;