From fbd862431c3b2b3832c55176f14c3698c7cdd5ac Mon Sep 17 00:00:00 2001 From: Jose Marcial Vieira Bisneto Date: Tue, 14 Feb 2017 07:56:07 -0300 Subject: [PATCH] namesys: Incomplete code disabled to not break compilation. --- main/Makefile | 3 ++- namesys/Makefile | 2 +- namesys/namesys.c | 6 +----- namesys/proquint.c | 1 + namesys/routing.c | 9 ++------- 5 files changed, 7 insertions(+), 14 deletions(-) diff --git a/main/Makefile b/main/Makefile index 9cedac3..9eb97b1 100644 --- a/main/Makefile +++ b/main/Makefile @@ -28,7 +28,8 @@ OBJS = main.o \ ../thirdparty/ipfsaddr/ipfs_addr.o \ ../unixfs/unixfs.o \ ../../c-protobuf/protobuf.o ../../c-protobuf/varint.o \ - ../util/errs.o + ../util/errs.o \ + ../util/time.o %.o: %.c $(DEPS) $(CC) -c -o $@ $< $(CFLAGS) diff --git a/namesys/Makefile b/namesys/Makefile index 8dab9f6..9997365 100644 --- a/namesys/Makefile +++ b/namesys/Makefile @@ -7,7 +7,7 @@ endif LFLAGS = DEPS = -OBJS = base.o dns.o isdomain.o namesys.o pb.o proquint.o publisher.o routing.o +OBJS = base.o dns.o isdomain.o namesys.o proquint.o %.o: %.c $(DEPS) $(CC) -c -o $@ $< $(CFLAGS) diff --git a/namesys/namesys.c b/namesys/namesys.c index b1fde45..6e2acdf 100644 --- a/namesys/namesys.c +++ b/namesys/namesys.c @@ -1,16 +1,12 @@ #include #include +#define __USE_ISOC11 #include #include "ipfs/cid/cid.h" #include "ipfs/path/path.h" #include "ipfs/namesys/namesys.h" #include "ipfs/dnslink/dnslink.h" -#ifndef __USE_ISOC11 -extern int timespec_get (struct timespec *__ts, int __base) - __THROW __nonnull ((1)); -#endif - /* mpns (a multi-protocol NameSystem) implements generic IPFS naming. * * Uses several Resolvers: diff --git a/namesys/proquint.c b/namesys/proquint.c index 561b4f0..d27ea07 100644 --- a/namesys/proquint.c +++ b/namesys/proquint.c @@ -1,6 +1,7 @@ #include #include #include +#include #include "ipfs/namesys/namesys.h" #include "ipfs/cid/cid.h" #include "ipfs/path/path.h" diff --git a/namesys/routing.c b/namesys/routing.c index 33c71ac..82c787f 100644 --- a/namesys/routing.c +++ b/namesys/routing.c @@ -1,14 +1,8 @@ #include #include #include +#define __USE_ISOC11 #include -#ifndef __USE_ISOC11 -extern int timespec_get (struct timespec *__ts, int __base) - __THROW __nonnull ((1)); -#endif -#ifndef TIME_UTC -# define TIME_UTC 1 -#endif #include "ipfs/namesys/routing.h" #include "ipfs/util/time.h" #include "mh/multihash.h" @@ -228,6 +222,7 @@ int ipfs_namesys_routing_resolve_once (char **path, char *name, int depth, char return err; } + // TODO: implement libp2p_crypto_verify // check sig with pk err = libp2p_crypto_verify(ipns_entry_data_for_sig(pb->IpnsEntry), pb->IpnsEntry->signature, &ok); if (err || !ok) {