]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
Workaround missing ALIGN() macro
authorStephen Hemminger <stephen.hemminger@vyatta.com>
Mon, 29 Mar 2010 22:17:48 +0000 (15:17 -0700)
committerStephen Hemminger <stephen.hemminger@vyatta.com>
Mon, 29 Mar 2010 22:17:48 +0000 (15:17 -0700)
XT_ALIGN() calls ALIGN macro but ALIGN is in kernel source not userspace.

tc/m_xt.c

index 3972d2d28a1b1f41586c78a607352e74b884fd11..bfc49371f35c5962ee99a329e9e4d9c5857e5760 100644 (file)
--- a/tc/m_xt.c
+++ b/tc/m_xt.c
 #       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;