diff options
author | Tobias Brunner <tobias@strongswan.org> | 2011-10-13 10:34:51 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2011-10-13 11:19:12 +0200 |
commit | 9a8fdc159a49ba82568f53cb9275b3ded092ba76 (patch) | |
tree | cd4bbd220ba63e702aa8c233cb5a07abc390ea10 /src/libstrongswan/utils.h | |
parent | aa82ae3aa48f9090adc80818724b7aa9e8724d25 (diff) | |
download | strongswan-9a8fdc159a49ba82568f53cb9275b3ded092ba76.tar.bz2 strongswan-9a8fdc159a49ba82568f53cb9275b3ded092ba76.tar.xz |
Added a replacement for closefrom (available on *BSD).
Diffstat (limited to 'src/libstrongswan/utils.h')
-rw-r--r-- | src/libstrongswan/utils.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/libstrongswan/utils.h b/src/libstrongswan/utils.h index f04c6334c..0f06fec6a 100644 --- a/src/libstrongswan/utils.h +++ b/src/libstrongswan/utils.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2010 Tobias Brunner + * Copyright (C) 2008-2011 Tobias Brunner * Copyright (C) 2008 Martin Willi * Hochschule fuer Technik Rapperswil * @@ -408,6 +408,15 @@ char *translate(char *str, const char *from, const char *to); */ bool mkdir_p(const char *path, mode_t mode); +#ifndef HAVE_CLOSEFROM +/** + * Close open file descriptors greater than or equal to lowfd. + * + * @param lowfd start closing file descriptoros from here + */ +void closefrom(int lowfd); +#endif + /** * Get a timestamp from a monotonic time source. * |