|
@@ -0,0 +1,39 @@
+--- src/Makefile
++++ src/Makefile
+@@ -51,7 +51,8 @@
+ OPTFLAGS= -g -ggdb
+ CFLAGS = $(WARN) $(REENT) $(DEBUG) $(OPTFLAGS) -I$(OOP_INC) $(ENABLE_DLOPEN) \
+ -DHAVE_IPV6_MREQ
+-LDFLAGS += -L$(OOP_LIB) -loop
++LDFLAGS += -L$(OOP_LIB)
++LIBS += -loop
+
+ PLATFORM=$(shell uname)
+
+@@ -60,9 +61,9 @@
+ CFLAGS += -DHAVE_SUSECONDS_T -DHAVE_UCHAR_MCAST_TTL -DHAVE_INTTYPES \
+ -DHAVE_IP_MREQ -DHAVE_INET6_S6_UN $(SPARC64)
+ LDFLAGS += $(SPARC64) -R$(OOP_LIB)
+-LDFLAGS += -lsocket -lnsl
++LIBS += -lsocket -lnsl
+ ifdef ENABLE_DLOPEN
+-LDFLAGS += -ldl
++LIBS += -ldl
+ endif
+ endif
+
+@@ -71,7 +72,7 @@
+ -DHAVE_SIGHANDLER_T -DHAVE_IP_MREQN -DHAVE_IP_MREQ \
+ -DHAVE_INET6_S6_ADDR32 -DHAVE_GROUP_SOURCE_REQ
+ ifdef ENABLE_DLOPEN
+-LDFLAGS += -ldl
++LIBS += -ldl
+ endif
+ endif
+
+@@ -106,4 +107,4 @@
+ build: clean default
+
+ $(TARGET): $(OBJ)
+- $(CC) $(LDFLAGS) -o $@ $^
++ $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
|
@@ -0,0 +1,47 @@
+--- 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;
+ }
|