build: add workaround for broken linux-glibc-devel 2.6.34 userspace headers

This commit is contained in:
Jan Engelhardt
2010-09-23 02:30:23 +02:00
parent 376a89e7d1
commit b5e2c7255a
26 changed files with 38 additions and 0 deletions

View File

@@ -6,6 +6,8 @@ HEAD
- support for Linux 2.6.36 - support for Linux 2.6.36
- SYSRQ: resolve compile error with Linux 2.6.36 - SYSRQ: resolve compile error with Linux 2.6.36
- TEE: resolve compile error with Linux 2.6.36 - TEE: resolve compile error with Linux 2.6.36
- add workaround for broken linux-glibc-devel 2.6.34 userspace headers
("implicit declaration of function 'ALIGN'")
Xtables-addons 1.28 (July 24 2010) Xtables-addons 1.28 (July 24 2010)

12
extensions/compat_user.h Normal file
View File

@@ -0,0 +1,12 @@
/*
* Userspace-level compat hacks
*/
#ifndef _XTABLES_COMPAT_USER_H
#define _XTABLES_COMPAT_USER_H 1
/* linux-glibc-devel 2.6.34 header screwup */
#ifndef ALIGN
# define ALIGN(s, n) (((s) + ((n) - 1)) & ~((n) - 1))
#endif
#endif /* _XTABLES_COMPAT_USER_H */

View File

@@ -16,6 +16,7 @@
#include <xtables.h> #include <xtables.h>
#include <linux/netfilter/x_tables.h> #include <linux/netfilter/x_tables.h>
#include "xt_CHAOS.h" #include "xt_CHAOS.h"
#include "compat_user.h"
enum { enum {
F_DELUDE = 1 << 0, F_DELUDE = 1 << 0,

View File

@@ -12,6 +12,7 @@
#include <xtables.h> #include <xtables.h>
#include "xt_CHECKSUM.h" #include "xt_CHECKSUM.h"
#include "compat_user.h"
static void CHECKSUM_help(void) static void CHECKSUM_help(void)
{ {

View File

@@ -13,6 +13,7 @@
#include <xtables.h> #include <xtables.h>
#include <linux/netfilter/x_tables.h> #include <linux/netfilter/x_tables.h>
#include "compat_user.h"
static void delude_tg_help(void) static void delude_tg_help(void)
{ {

View File

@@ -17,6 +17,7 @@
#include <xtables.h> #include <xtables.h>
#include "xt_DHCPMAC.h" #include "xt_DHCPMAC.h"
#include "mac.c" #include "mac.c"
#include "compat_user.h"
enum { enum {
F_MAC = 1 << 0, F_MAC = 1 << 0,

View File

@@ -10,6 +10,7 @@
#include <stdio.h> #include <stdio.h>
#include <getopt.h> #include <getopt.h>
#include <xtables.h> #include <xtables.h>
#include "compat_user.h"
static void echo_tg_help(void) static void echo_tg_help(void)
{ {

View File

@@ -14,6 +14,7 @@
#include <string.h> #include <string.h>
#include <xtables.h> #include <xtables.h>
#include "xt_IPMARK.h" #include "xt_IPMARK.h"
#include "compat_user.h"
enum { enum {
FL_ADDR_USED = 1 << 0, FL_ADDR_USED = 1 << 0,

View File

@@ -13,6 +13,7 @@
#include <string.h> #include <string.h>
#include <xtables.h> #include <xtables.h>
#include "xt_LOGMARK.h" #include "xt_LOGMARK.h"
#include "compat_user.h"
enum { enum {
F_LEVEL = 1 << 0, F_LEVEL = 1 << 0,

View File

@@ -15,6 +15,7 @@
#include <xtables.h> #include <xtables.h>
#include <linux/netfilter.h> #include <linux/netfilter.h>
#include "xt_RAWNAT.h" #include "xt_RAWNAT.h"
#include "compat_user.h"
enum { enum {
FLAGS_TO = 1 << 0, FLAGS_TO = 1 << 0,

View File

@@ -15,6 +15,7 @@
#include <xtables.h> #include <xtables.h>
#include <linux/netfilter.h> #include <linux/netfilter.h>
#include "xt_RAWNAT.h" #include "xt_RAWNAT.h"
#include "compat_user.h"
enum { enum {
FLAGS_TO = 1 << 0, FLAGS_TO = 1 << 0,

View File

@@ -1,5 +1,6 @@
#include <stdio.h> #include <stdio.h>
#include <xtables.h> #include <xtables.h>
#include "compat_user.h"
static void steal_tg_help(void) static void steal_tg_help(void)
{ {

View File

@@ -5,6 +5,7 @@
#include <stdio.h> #include <stdio.h>
#include <getopt.h> #include <getopt.h>
#include <xtables.h> #include <xtables.h>
#include "compat_user.h"
static void sysrq_tg_help(void) static void sysrq_tg_help(void)
{ {

View File

@@ -5,6 +5,7 @@
#include <stdio.h> #include <stdio.h>
#include <getopt.h> #include <getopt.h>
#include <xtables.h> #include <xtables.h>
#include "compat_user.h"
static void tarpit_tg_help(void) static void tarpit_tg_help(void)
{ {

View File

@@ -23,6 +23,7 @@
#include <linux/netfilter.h> #include <linux/netfilter.h>
#include <linux/netfilter/x_tables.h> #include <linux/netfilter/x_tables.h>
#include "xt_TEE.h" #include "xt_TEE.h"
#include "compat_user.h"
enum { enum {
FLAG_GATEWAY = 1 << 0, FLAG_GATEWAY = 1 << 0,

View File

@@ -16,6 +16,7 @@
#include <getopt.h> #include <getopt.h>
#include <xtables.h> #include <xtables.h>
#include "xt_condition.h" #include "xt_condition.h"
#include "compat_user.h"
static void condition_help(void) static void condition_help(void)
{ {

View File

@@ -16,6 +16,7 @@
#include <xtables.h> #include <xtables.h>
#include "xt_DHCPMAC.h" #include "xt_DHCPMAC.h"
#include "mac.c" #include "mac.c"
#include "compat_user.h"
enum { enum {
F_MAC = 1 << 0, F_MAC = 1 << 0,

View File

@@ -15,6 +15,7 @@
#include <string.h> #include <string.h>
#include <xtables.h> #include <xtables.h>
#include "xt_fuzzy.h" #include "xt_fuzzy.h"
#include "compat_user.h"
static void fuzzy_mt_help(void) static void fuzzy_mt_help(void)
{ {

View File

@@ -24,6 +24,7 @@
#include <unistd.h> #include <unistd.h>
#include <xtables.h> #include <xtables.h>
#include "xt_geoip.h" #include "xt_geoip.h"
#include "compat_user.h"
#define GEOIP_DB_DIR "/usr/share/xt_geoip" #define GEOIP_DB_DIR "/usr/share/xt_geoip"
static void geoip_help(void) static void geoip_help(void)

View File

@@ -15,6 +15,7 @@
#include <xtables.h> #include <xtables.h>
#include "xt_iface.h" #include "xt_iface.h"
#include "compat_user.h"
static const struct option iface_mt_opts[] = { static const struct option iface_mt_opts[] = {
{.name = "iface", .has_arg = true, .val = 'i'}, {.name = "iface", .has_arg = true, .val = 'i'},

View File

@@ -17,6 +17,7 @@
#include <ctype.h> #include <ctype.h>
#include <xtables.h> #include <xtables.h>
#include "xt_ipp2p.h" #include "xt_ipp2p.h"
#include "compat_user.h"
#define param_act(t, s, f) xtables_param_act((t), "ipp2p", (s), (f)) #define param_act(t, s, f) xtables_param_act((t), "ipp2p", (s), (f))
static void ipp2p_mt_help(void) static void ipp2p_mt_help(void)

View File

@@ -14,6 +14,7 @@
#include <string.h> #include <string.h>
#include <xtables.h> #include <xtables.h>
#include "xt_ipv4options.h" #include "xt_ipv4options.h"
#include "compat_user.h"
/* /*
* Overview from http://www.networksorcery.com/enp/protocol/ip.htm * Overview from http://www.networksorcery.com/enp/protocol/ip.htm

View File

@@ -5,6 +5,7 @@
#include <string.h> #include <string.h>
#include <xtables.h> #include <xtables.h>
#include "xt_length2.h" #include "xt_length2.h"
#include "compat_user.h"
enum { enum {
F_LAYER = 1 << 0, F_LAYER = 1 << 0,

View File

@@ -17,6 +17,7 @@
#include <xtables.h> #include <xtables.h>
#include <linux/netfilter/x_tables.h> #include <linux/netfilter/x_tables.h>
#include "xt_lscan.h" #include "xt_lscan.h"
#include "compat_user.h"
static const struct option lscan_mt_opts[] = { static const struct option lscan_mt_opts[] = {
{.name = "stealth", .has_arg = false, .val = 'x'}, {.name = "stealth", .has_arg = false, .val = 'x'},

View File

@@ -28,6 +28,7 @@
#include <xtables.h> #include <xtables.h>
#include <linux/netfilter/x_tables.h> #include <linux/netfilter/x_tables.h>
#include "xt_psd.h" #include "xt_psd.h"
#include "compat_user.h"
/* Function which prints out usage message. */ /* Function which prints out usage message. */
static void psd_mt_help(void) { static void psd_mt_help(void) {

View File

@@ -15,6 +15,7 @@
#include <string.h> #include <string.h>
#include <xtables.h> #include <xtables.h>
#include "xt_quota2.h" #include "xt_quota2.h"
#include "compat_user.h"
enum { enum {
FL_QUOTA = 1 << 0, FL_QUOTA = 1 << 0,