soccr: clean a bit includes list

soccr.h:
After previous patch <linux/types.h> is not needed anymore,
<netinet/tcp.h> 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 <dsafonov@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
Dmitry Safonov 2017-04-28 21:28:38 +03:00 committed by Andrei Vagin
parent 2a37b50765
commit 03eccbf1c8
2 changed files with 8 additions and 11 deletions

View file

@ -1,13 +1,11 @@
#include <errno.h>
#include <libnet.h>
#include <linux/sockios.h>
#include <linux/types.h>
#include <netinet/tcp.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <errno.h>
#include <linux/sockios.h>
#include <libnet.h>
#include <assert.h>
#include <errno.h>
#include "soccr.h"
#ifndef SIOCOUTQNSD

View file

@ -1,8 +1,9 @@
#ifndef __LIBSOCCR_H__
#define __LIBSOCCR_H__
#include <linux/types.h>
#include <netinet/in.h>
#include <stdint.h>
#include <netinet/in.h> /* sockaddr_in, sockaddr_in6 */
#include <netinet/tcp.h> /* TCP_REPAIR_WINDOW, TCP_TIMESTAMP */
#include <stdint.h> /* uint32_t */
#include <sys/socket.h> /* 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