Blame lib/old_socket.h

Packit Service 5956c7
/*
Packit Service 5956c7
 * Soft:        Keepalived is a failover program for the LVS project
Packit Service 5956c7
 *              <www.linuxvirtualserver.org>. It monitor & manipulate
Packit Service 5956c7
 *              a loadbalanced server pool using multi-layer checks.
Packit Service 5956c7
 *
Packit Service 5956c7
 * Part:        old_socket.h include file.
Packit Service 5956c7
 *
Packit Service 5956c7
 * Author:      Alexandre Cassen, <acassen@linux-vs.org>
Packit Service 5956c7
 *
Packit Service 5956c7
 *              This program is distributed in the hope that it will be useful,
Packit Service 5956c7
 *              but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service 5956c7
 *              MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Packit Service 5956c7
 *              See the GNU General Public License for more details.
Packit Service 5956c7
 *
Packit Service 5956c7
 *              This program is free software; you can redistribute it and/or
Packit Service 5956c7
 *              modify it under the terms of the GNU General Public License
Packit Service 5956c7
 *              as published by the Free Software Foundation; either version
Packit Service 5956c7
 *              2 of the License, or (at your option) any later version.
Packit Service 5956c7
 *
Packit Service 5956c7
 * Copyright (C) 2001-2016 Alexandre Cassen, <acassen@gmail.com>
Packit Service 5956c7
 */
Packit Service 5956c7
Packit Service 5956c7
#ifndef _OLD_SOCKET_H
Packit Service 5956c7
#define _OLD_SOCKET_H 1
Packit Service 5956c7
Packit Service 5956c7
#include "config.h"
Packit Service 5956c7
Packit Service 5956c7
#if !HAVE_DECL_SOCK_NONBLOCK || !HAVE_DECL_SOCK_CLOEXEC
Packit Service 5956c7
#include <stdbool.h>
Packit Service 5956c7
Packit Service 5956c7
/* Kernels < 2.6.27 and glibc < 2.9 don't support the SOCK_CLOEXEC or SOCK_NONBLOCK options */
Packit Service 5956c7
Packit Service 5956c7
/* We need to know if SOCK_NONBLOCK is desired */
Packit Service 5956c7
#if !HAVE_DECL_SOCK_NONBLOCK
Packit Service 5956c7
#define SOCK_NONBLOCK	04000
Packit Service 5956c7
#endif
Packit Service 5956c7
Packit Service 5956c7
/* SOCK_CLOEXEC is always wanted, so we don't want to set if it is not defined */
Packit Service 5956c7
#if !HAVE_DECL_SOCK_CLOEXEC
Packit Service 5956c7
#define SOCK_CLOEXEC	0
Packit Service 5956c7
#endif
Packit Service 5956c7
Packit Service 5956c7
extern bool set_sock_flags(int fd, int cmd, long flags);
Packit Service 5956c7
#endif
Packit Service 5956c7
Packit Service 5956c7
#endif