diff --git a/src/1905_tlvs.h b/src/1905_tlvs.h index 671666ba476cd4c5b3ca9d8ecf005e8f272fd4b3..88c5faff03d0b861447da9f82bf8931170df0a6a 100644 --- a/src/1905_tlvs.h +++ b/src/1905_tlvs.h @@ -18,8 +18,8 @@ #define ETHERTYPE_1905 0x893a #define ETHERTYPE_LLDP 0x88cc -#define MCAST_1905 "\x01\x80\xC2\x00\x00\x13" -#define MCAST_LLDP "\x01\x80\xC2\x00\x00\x0E" +#define MCAST_1905 (uint8_t *)"\x01\x80\xC2\x00\x00\x13" +#define MCAST_LLDP (uint8_t *)"\x01\x80\xC2\x00\x00\x0E" /* 1905 CMDU types */ diff --git a/src/Makefile b/src/Makefile index 94c2331262da5c9f68b7f998cd0a1e18629ede04..e6edb589afac0d3f41ae296aff1cc29c6ff3e832 100644 --- a/src/Makefile +++ b/src/Makefile @@ -46,7 +46,7 @@ LIBS += -rdynamic -ldl .PHONY: all clean tests -all: libmidgen.so ieee1905d libieee1905.so extmods tests +all: libmidgen.so libieee1905.so ieee1905d extmods tests %.o: %.c $(CC) $(CFLAGS) -fPIC -c -o $@ $< diff --git a/src/debug.c b/src/debug.c index e589b8e525ecefa7db4dd8b2767a7e2b9f2411cc..64ee650d8f0d544f1d8c3fbadb93f78244d0fb90 100644 --- a/src/debug.c +++ b/src/debug.c @@ -117,7 +117,7 @@ void log_message(int level, const char *fmt, ...) vsyslog(syslog_level[level], fmt, args); if (outfile) { - fprintf(outfile, "[%lu]: ", getpid()); + fprintf(outfile, "[%d]: ", getpid()); vfprintf(outfile, fmt, args); } diff --git a/src/extensions/map/maputil.c b/src/extensions/map/maputil.c index fa793a55b3ccc722a320e94f7764eea61188e27b..95855aaf9bd6954bce4f97879b62f306d8e441ba 100644 --- a/src/extensions/map/maputil.c +++ b/src/extensions/map/maputil.c @@ -14,6 +14,7 @@ #include <stdarg.h> #include "1905_tlvs.h" +#include "cmdu.h" #include "map2.h" #include "map_module.h" @@ -26,9 +27,6 @@ do { \ } while(0) -extern const char *tlv_type2str(uint8_t type); //FIXME -extern const char *cmdu_type2str(uint16_t type); - int map_prepare_cmdu_mask(uint8_t mask[], ...) { @@ -180,4 +178,4 @@ const char *map_tlv_type2str(uint8_t type) return "UNKNOWN"; #undef T2STR -} \ No newline at end of file +}