5 # If we keep a copy of the kernel header in the SVN tree, we'll have
6 # to worry about synchronization issues forever. Instead, we just copy
7 # the headers that we need from the lastest kernel version at autogen
10 INCLUDEDIR=${KERNEL_DIR:-/lib/modules/`uname -r`/build}/include/linux
11 if [ -f $INCLUDEDIR/netfilter/nfnetlink_queue.h ]
13 TARGET=include/libnetfilter_queue/linux_nfnetlink_queue.h
14 echo "Copying nfnetlink_queue.h to linux_nfnetlink_queue.h"
15 cp $INCLUDEDIR/netfilter/nfnetlink_queue.h $TARGET
17 sed 's/linux\/netfilter\/nfnetlink.h/libnfnetlink\/linux_nfnetlink.h/g' $TARGET > $TEMP
18 # Add aligned_u64 definition after #define _NFNETLINK_QUEUE_H
20 if ( $0 == "#define _NFNETLINK_QUEUE_H" ) {
24 print "#ifndef aligned_u64"
25 print "#define aligned_u64 unsigned long long __attribute__((aligned(8)))"
32 echo "can't find nfnetlink_queue.h kernel file in $INCLUDEDIR"
37 [ "x$1" = "xdistrib" ] && include