SHA256
1
0
forked from pool/collectd
collectd/collectd-fix_own_iptc.patch

74 lines
2.1 KiB
Diff

--- src/owniptc/libiptc.c.orig 2012-02-19 17:40:40.717235267 +0100
+++ src/owniptc/libiptc.c 2012-02-19 17:43:13.324229837 +0100
@@ -81,7 +81,7 @@
};
/* Convenience structures */
-struct ipt_error_target
+struct x_ipt_error_target
{
STRUCT_ENTRY_TARGET t;
char error[TABLE_MAXNAMELEN];
@@ -1007,10 +1007,10 @@
/* Convenience structures */
struct iptcb_chain_start{
STRUCT_ENTRY e;
- struct ipt_error_target name;
+ struct x_ipt_error_target name;
};
#define IPTCB_CHAIN_START_SIZE (sizeof(STRUCT_ENTRY) + \
- ALIGN(sizeof(struct ipt_error_target)))
+ ALIGN(sizeof(struct x_ipt_error_target)))
struct iptcb_chain_foot {
STRUCT_ENTRY e;
@@ -1021,10 +1021,10 @@
struct iptcb_chain_error {
STRUCT_ENTRY entry;
- struct ipt_error_target target;
+ struct x_ipt_error_target target;
};
#define IPTCB_CHAIN_ERROR_SIZE (sizeof(STRUCT_ENTRY) + \
- ALIGN(sizeof(struct ipt_error_target)))
+ ALIGN(sizeof(struct x_ipt_error_target)))
@@ -1069,7 +1069,7 @@
head->e.next_offset = IPTCB_CHAIN_START_SIZE;
strcpy(head->name.t.u.user.name, ERROR_TARGET);
head->name.t.u.target_size =
- ALIGN(sizeof(struct ipt_error_target));
+ ALIGN(sizeof(struct x_ipt_error_target));
strcpy(head->name.error, c->name);
} else {
repl->hook_entry[c->hooknum-1] = c->head_offset;
@@ -1113,7 +1113,7 @@
if (!iptcc_is_builtin(c)) {
/* Chain has header */
*offset += sizeof(STRUCT_ENTRY)
- + ALIGN(sizeof(struct ipt_error_target));
+ + ALIGN(sizeof(struct x_ipt_error_target));
(*num)++;
}
@@ -1153,7 +1153,7 @@
/* Append one error rule at end of chain */
num++;
offset += sizeof(STRUCT_ENTRY)
- + ALIGN(sizeof(struct ipt_error_target));
+ + ALIGN(sizeof(struct x_ipt_error_target));
/* ruleset size is now in offset */
*size = offset;
@@ -1177,7 +1177,7 @@
error->entry.target_offset = sizeof(STRUCT_ENTRY);
error->entry.next_offset = IPTCB_CHAIN_ERROR_SIZE;
error->target.t.u.user.target_size =
- ALIGN(sizeof(struct ipt_error_target));
+ ALIGN(sizeof(struct x_ipt_error_target));
strcpy((char *)&error->target.t.u.user.name, ERROR_TARGET);
strcpy((char *)&error->target.error, "ERROR");