From 03eccbf1c868b0b909d7c51d5fa4aef655b32964 Mon Sep 17 00:00:00 2001 From: Dmitry Safonov Date: Fri, 28 Apr 2017 21:28:38 +0300 Subject: [PATCH] soccr: clean a bit includes list soccr.h: After previous patch is not needed anymore, is needed as we test for it in feature tests, i.e., struct tcp_repair_window is declared there. Also drop forward-declaration of (struct libsoccr_sk) - it's declared again below. soccr.c: Sort headers by name so errors like twice-including errno.h will not happen again. Also remove assert.h. Signed-off-by: Dmitry Safonov Signed-off-by: Andrei Vagin --- soccr/soccr.c | 10 ++++------ soccr/soccr.h | 9 ++++----- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/soccr/soccr.c b/soccr/soccr.c index 0a7748149..583f1eaaa 100644 --- a/soccr/soccr.c +++ b/soccr/soccr.c @@ -1,13 +1,11 @@ +#include +#include +#include +#include #include #include #include #include -#include -#include -#include -#include -#include - #include "soccr.h" #ifndef SIOCOUTQNSD diff --git a/soccr/soccr.h b/soccr/soccr.h index 2957fd6c4..c9d138bfc 100644 --- a/soccr/soccr.h +++ b/soccr/soccr.h @@ -1,8 +1,9 @@ #ifndef __LIBSOCCR_H__ #define __LIBSOCCR_H__ -#include -#include -#include +#include /* sockaddr_in, sockaddr_in6 */ +#include /* TCP_REPAIR_WINDOW, TCP_TIMESTAMP */ +#include /* uint32_t */ +#include /* sockaddr */ #include "config.h" @@ -49,8 +50,6 @@ enum { #define TCP_REPAIR_WINDOW 29 #endif -struct libsoccr_sk; - void libsoccr_set_log(unsigned int level, void (*fn)(unsigned int level, const char *fmt, ...)); #define SOCCR_LOG_ERR 1