From 7b51c287a60d2f202fb131eeed9d1bf19b65a7a3 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 24 Nov 2015 12:30:46 +0100 Subject: [FUSE] Mid-refactoring, does not compile --- src/fuse/helper.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/fuse/helper.h') diff --git a/src/fuse/helper.h b/src/fuse/helper.h index bbba44c..35cdc8a 100644 --- a/src/fuse/helper.h +++ b/src/fuse/helper.h @@ -4,6 +4,9 @@ #include #include #include +#include + +#include "../types.h" typedef struct log_info { @@ -21,4 +24,9 @@ bool sock_printable(struct sockaddr *addr, socklen_t addrLen, char *output, int int connect_to_server(char *server_adress, int port); +static inline bool isSameAddressPort(const dnbd3_host_t * const a, const dnbd3_host_t * const b) +{ + return (a->type == b->type) && (a->port == b->port) && (0 == memcmp( a->addr, b->addr, (a->type == AF_INET ? 4 : 16) )); +} + #endif -- cgit v1.2.3-55-g7522