Fixed build errors 79/132679/3 submit/tizen/20170608.073736
authorSeonah Moon <seonah1.moon@samsung.com>
Wed, 7 Jun 2017 06:29:12 +0000 (15:29 +0900)
committerSeonah Moon <seonah1.moon@samsung.com>
Wed, 7 Jun 2017 06:33:11 +0000 (15:33 +0900)
- Apply upstream patch to fix 64-bit printf formats
 (http://git.netfilter.org/iptables/commit/?id=1ec1fb7af08121d974416a1a23cd2d329fc0e29e)
- Add new *.so files

Change-Id: I355a293713a4f11b701c8b114f1d86cbd914699e
Signed-off-by: Seonah Moon <seonah1.moon@samsung.com>
extensions/libxt_hashlimit.c
packaging/iptables.spec

index ef2abb8..41fcaa5 100644 (file)
@@ -12,9 +12,9 @@
  */
 #define _DEFAULT_SOURCE 1
 #define _ISOC99_SOURCE 1
+#include <inttypes.h>
 #include <math.h>
 #include <stdbool.h>
-#include <stdint.h>
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
@@ -262,7 +262,7 @@ static uint64_t parse_burst(const char *burst, int revision)
        if (v > max)
                xtables_error(PARAMETER_PROBLEM, "bad value for option "
                        "\"--hashlimit-burst\", value \"%s\" too large "
-                               "(max %lumb).", burst, max/1024/1024);
+                               "(max %"PRIu64"mb).", burst, max/1024/1024);
        return v;
 }
 
@@ -285,8 +285,8 @@ static bool parse_bytes(const char *rate, void *val, struct hashlimit_mt_udata *
        tmp = (uint64_t) r * factor;
        if (tmp > max)
                xtables_error(PARAMETER_PROBLEM,
-                       "Rate value too large \"%llu\" (max %lu)\n",
-                                       (unsigned long long)tmp, max);
+                       "Rate value too large \"%"PRIu64"\" (max %"PRIu64")\n",
+                                       tmp, max);
 
        tmp = bytes_to_cost(tmp);
        if (tmp == 0)
@@ -557,7 +557,8 @@ static void hashlimit_mt_check_v1(struct xt_fcheck_call *cb)
                if (cb->xflags & F_BURST) {
                        if (info->cfg.burst < cost_to_bytes(info->cfg.avg))
                                xtables_error(PARAMETER_PROBLEM,
-                                       "burst cannot be smaller than %lub", cost_to_bytes(info->cfg.avg));
+                                       "burst cannot be smaller than %"PRIu64"b",
+                                       cost_to_bytes(info->cfg.avg));
 
                        burst = info->cfg.burst;
                        burst /= cost_to_bytes(info->cfg.avg);
@@ -587,7 +588,8 @@ static void hashlimit_mt_check(struct xt_fcheck_call *cb)
                if (cb->xflags & F_BURST) {
                        if (info->cfg.burst < cost_to_bytes(info->cfg.avg))
                                xtables_error(PARAMETER_PROBLEM,
-                                       "burst cannot be smaller than %lub", cost_to_bytes(info->cfg.avg));
+                                       "burst cannot be smaller than %"PRIu64"b",
+                                       cost_to_bytes(info->cfg.avg));
 
                        burst = info->cfg.burst;
                        burst /= cost_to_bytes(info->cfg.avg);
@@ -631,7 +633,7 @@ static uint32_t print_rate(uint32_t period, int revision)
             || _rates[i].mult/period < _rates[i].mult%period)
                        break;
 
-       printf(" %lu/%s", _rates[i-1].mult / period, _rates[i-1].name);
+       printf(" %"PRIu64"/%s", _rates[i-1].mult / period, _rates[i-1].name);
        /* return in msec */
        return _rates[i-1].mult / scale * 1000;
 }
index 312f7cc..7dfcb30 100755 (executable)
@@ -78,6 +78,7 @@ rm -rf %{buildroot}%{_mandir}
 %{_libdir}/xtables/libipt*
 %{_libdir}/xtables/libip6t*
 %{_libdir}/xtables/libxt*
+%{_libdir}/xtables/libebt*
 %{_libdir}/libip*tc.so.*
 %{_libdir}/libxtables.so.*
 %license COPYING