Small changes to allow compile

This commit is contained in:
John Jones 2016-12-05 06:56:09 -05:00
parent fa1084b45c
commit ee1cf1359c
3 changed files with 7 additions and 4 deletions

1
.gitignore vendored
View file

@ -7,4 +7,5 @@
*.o *.o
*.a *.a
.settings/language.settings.xml .settings/language.settings.xml
test_multiaddr

View file

@ -5,7 +5,7 @@ ifdef DEBUG
CFLAGS += -g3 CFLAGS += -g3
endif endif
LFLAGS = -lmultiaddr LFLAGS = -lm
DEPS = include/multiaddr/base58.h include/multiaddr/endian.h include/multiaddr/multiaddr.h \ DEPS = include/multiaddr/base58.h include/multiaddr/endian.h include/multiaddr/multiaddr.h \
include/multiaddr/protocols.h include/multiaddr/protoutils.h include/multiaddr/varhexutils.h \ include/multiaddr/protocols.h include/multiaddr/protoutils.h include/multiaddr/varhexutils.h \
include/multiaddr/varint.h include/multiaddr/varint.h
@ -17,7 +17,7 @@ OBJS = base58.o varint.o
libmultiaddr.a: $(OBJS) libmultiaddr.a: $(OBJS)
ar rcs $@ $^ ar rcs $@ $^
test_multiaddr: libmultiaddr.a testing.o test_multiaddr: testing.o libmultiaddr.a
$(CC) -o $@ $^ $(LFLAGS) $(CC) -o $@ $^ $(LFLAGS)
all: test_multiaddr all: test_multiaddr

View file

@ -1,7 +1,7 @@
#ifndef MULTIADDR #ifndef MULTIADDR
#define MULTIADDR #define MULTIADDR
#include "varhexutils.h" #include "varhexutils.h"
#include "codecs.h" //#include "codecs.h"
#include "varint.h" #include "varint.h"
#include "protocols.h" #include "protocols.h"
#include "protoutils.h" #include "protoutils.h"
@ -35,6 +35,7 @@ struct maddr new_maddr_fb(uint8_t * byteaddress,int size)//Construct new address
return anewaddr2; return anewaddr2;
} }
} }
return anewaddr2;
} }
struct maddr new_maddr_fs(char * straddress)//Construct new address from string struct maddr new_maddr_fs(char * straddress)//Construct new address from string
{ {
@ -52,6 +53,7 @@ struct maddr new_maddr_fs(char * straddress)//Construct new address from string
} }
return anewaddr; return anewaddr;
} }
return anewaddr;
} }
int m_encapsulate(struct maddr * result, char * string) int m_encapsulate(struct maddr * result, char * string)
{ {
@ -123,4 +125,4 @@ int m_decapsulate(struct maddr * result, char * srci)
} }
} }
#endif #endif