File nepim-fix-pointer-arithmetics.patch of Package nepim
--- src/common.c
+++ src/common.c
@@ -230,7 +230,7 @@
}
if (nepim_global.udp_accumulative_loss)
- fprintf(out, " %llu", acc_pkt_lost);
+ fprintf(out, " %zu", acc_pkt_lost);
fprintf(out, "\n");
--- src/udp_server.c
+++ src/udp_server.c
@@ -31,6 +31,7 @@
#include <errno.h>
#include <oop.h>
#include <assert.h>
+#include <stdint.h>
#include "conf.h"
#include "sock.h"
@@ -718,14 +719,14 @@
static void *on_udp_slot_start(oop_source *src, struct timeval tv, void *user)
{
- int local_slot = (int) user;
+ intptr_t local_slot = (intptr_t) user;
udp_slot_start(local_slot);
return OOP_CONTINUE;
}
-static void schedule_udp_slot_start(int local_slot)
+static void schedule_udp_slot_start(intptr_t local_slot)
{
nepim_slot_t *slot = nepim_slot_set_get(&slots, local_slot);
nepim_session_t *session;
@@ -968,7 +969,7 @@
#endif
if (hdr.seq) {
- fprintf(stderr, "%d %d-%d: warn: ignoring invalid UDP hello header sequence: %llu\n",
+ fprintf(stderr, "%d %d-%d: warn: ignoring invalid UDP hello header sequence: %zu\n",
sd, hdr.dst_slot, hdr.src_slot, hdr.seq);
return OOP_CONTINUE;
}