Don't enable dnsmasq IPSET functionality on 2.4 kernel
[tomato.git] / release / src / router / libdaemon / libdaemon / dnonblock.h
blob8c5b8fdece57000e2e2e914cec1905c9d3069a70
1 #ifndef foodaemonnonblockhfoo
2 #define foodaemonnonblockhfoo
4 /***
5 This file is part of libdaemon.
7 Copyright 2003-2008 Lennart Poettering
9 libdaemon is free software; you can redistribute it and/or modify
10 it under the terms of the GNU Lesser General Public License as
11 published by the Free Software Foundation, either version 2.1 of the
12 License, or (at your option) any later version.
14 libdaemon is distributed in the hope that it will be useful, but
15 WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 Lesser General Public License for more details.
19 You should have received a copy of the GNU Lesser General Public
20 License along with libdaemon. If not, see
21 <http://www.gnu.org/licenses/>.
22 ***/
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
28 /** \file
30 * Contains a single function used to change a file descriptor to
31 * non-blocking mode using fcntl().
34 /** Change the passed file descriptor to non-blocking or blocking
35 * mode, depending on b.
36 * @param fd The file descriptor to manipulation
37 * @param b TRUE if non-blocking mode should be enabled, FALSE if it
38 * should be disabled
39 * @return Zero on success, nonzero on failure.
41 int daemon_nonblock(int fd, int b);
43 #ifdef __cplusplus
45 #endif
47 #endif