Commit 03eccbf1 authored by Dmitry Safonov's avatar Dmitry Safonov Committed by Andrei Vagin

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: 's avatarDmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent 2a37b507
#include <errno.h>
#include <libnet.h>
#include <linux/sockios.h>
#include <linux/types.h>
#include <netinet/tcp.h> #include <netinet/tcp.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <errno.h>
#include <linux/sockios.h>
#include <libnet.h>
#include <assert.h>
#include <errno.h>
#include "soccr.h" #include "soccr.h"
#ifndef SIOCOUTQNSD #ifndef SIOCOUTQNSD
......
#ifndef __LIBSOCCR_H__ #ifndef __LIBSOCCR_H__
#define __LIBSOCCR_H__ #define __LIBSOCCR_H__
#include <linux/types.h> #include <netinet/in.h> /* sockaddr_in, sockaddr_in6 */
#include <netinet/in.h> #include <netinet/tcp.h> /* TCP_REPAIR_WINDOW, TCP_TIMESTAMP */
#include <stdint.h> #include <stdint.h> /* uint32_t */
#include <sys/socket.h> /* sockaddr */
#include "config.h" #include "config.h"
...@@ -49,8 +50,6 @@ enum { ...@@ -49,8 +50,6 @@ enum {
#define TCP_REPAIR_WINDOW 29 #define TCP_REPAIR_WINDOW 29
#endif #endif
struct libsoccr_sk;
void libsoccr_set_log(unsigned int level, void (*fn)(unsigned int level, const char *fmt, ...)); void libsoccr_set_log(unsigned int level, void (*fn)(unsigned int level, const char *fmt, ...));
#define SOCCR_LOG_ERR 1 #define SOCCR_LOG_ERR 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment