]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
Fix aligned_u64 type on 64 bit: its an unsigned long, not an unsigned long long.
authorPatrick McHardy <kaber@trash.net>
Wed, 5 Sep 2007 14:19:23 +0000 (14:19 +0000)
committerPatrick McHardy <kaber@trash.net>
Wed, 5 Sep 2007 14:19:23 +0000 (14:19 +0000)
Fixes compiler warning in quota match.

extensions/libxt_connbytes.c
include/xtables.h

index 1a3cf6e42ce51f7f1e41b766257162802dfd6465..7a99f42568a531d64e577434e29649cf871b264f 100644 (file)
@@ -42,7 +42,8 @@ parse_range(const char *arg, struct xt_connbytes_info *si)
        }
        if (si->count.from > si->count.to)
                exit_error(PARAMETER_PROBLEM, "%llu should be less than %llu",
-                          si->count.from, si->count.to);
+                          (unsigned long long)si->count.from,
+                          (unsigned long long)si->count.to);
 }
 
 /* Function which parses command options; returns true if it
@@ -152,11 +153,13 @@ print(const void *ip,
        struct xt_connbytes_info *sinfo = (struct xt_connbytes_info *)match->data;
 
        if (sinfo->count.from > sinfo->count.to) 
-               printf("connbytes ! %llu:%llu ", sinfo->count.to,
-                       sinfo->count.from);
+               printf("connbytes ! %llu:%llu ",
+                       (unsigned long long)sinfo->count.to,
+                       (unsigned long long)sinfo->count.from);
        else
-               printf("connbytes %llu:%llu ",sinfo->count.from,
-                       sinfo->count.to);
+               printf("connbytes %llu:%llu ",
+                       (unsigned long long)sinfo->count.from,
+                       (unsigned long long)sinfo->count.to);
 
        fputs("connbytes mode ", stdout);
        print_mode(sinfo);
@@ -171,11 +174,13 @@ static void save(const void *ip, const struct xt_entry_match *match)
        struct xt_connbytes_info *sinfo = (struct xt_connbytes_info *)match->data;
 
        if (sinfo->count.from > sinfo->count.to) 
-               printf("! --connbytes %llu:%llu ", sinfo->count.to,
-                       sinfo->count.from);
+               printf("! --connbytes %llu:%llu ",
+                       (unsigned long long)sinfo->count.to,
+                       (unsigned long long)sinfo->count.from);
        else
-               printf("--connbytes %llu:%llu ", sinfo->count.from,
-                       sinfo->count.to);
+               printf("--connbytes %llu:%llu ",
+                       (unsigned long long)sinfo->count.from,
+                       (unsigned long long)sinfo->count.to);
 
        fputs("--connbytes-mode ", stdout);
        print_mode(sinfo);
index f23c303ff9f485c9389a05945f90a92404646522..5f0caea3185809e41d9d9747a577d9608cd3ad31 100644 (file)
@@ -218,7 +218,7 @@ enum exittype {
 };
 
 /* this is a special 64bit data type that is 8-byte aligned */
-#define aligned_u64 unsigned long long __attribute__((aligned(8)))
+#define aligned_u64 u_int64_t __attribute__((aligned(8)))
 
 extern void exit_printhelp() __attribute__((noreturn));
 extern void exit_tryhelp(int) __attribute__((noreturn));