diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-02-21 21:15:31 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-02-21 21:15:31 +0000 |
commit | daefbfe691fdc1856fd7ff91e50cd3600140359b (patch) | |
tree | 2daf6085e1b86c80f138fef4ef8df244448d5b8e /src/common/compat.h | |
parent | e790dbe779de620bdb0b2f52d4d04ce84bb7c5a8 (diff) | |
download | tor-daefbfe691fdc1856fd7ff91e50cd3600140359b.tar.gz tor-daefbfe691fdc1856fd7ff91e50cd3600140359b.zip |
r14371@tombo: nickm | 2008-02-21 16:13:18 -0500
Fix all -Wshorten-64-to-32 warnings that appear on my macbook.
svn:r13662
Diffstat (limited to 'src/common/compat.h')
-rw-r--r-- | src/common/compat.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/common/compat.h b/src/common/compat.h index 3ac38d7dac..75b6e5420f 100644 --- a/src/common/compat.h +++ b/src/common/compat.h @@ -37,9 +37,15 @@ #include <ctype.h> #endif #include <stdarg.h> +#ifdef HAVE_SYS_RESOURCE_H +#include <sys/resource.h> +#endif #ifdef HAVE_SYS_SOCKET_H #include <sys/socket.h> #endif +#ifdef HAVE_SYS_TYPES_H +#include <sys/types.h> +#endif #ifdef HAVE_NETINET_IN_H #include <netinet/in.h> #endif @@ -443,7 +449,10 @@ uint32_t get_uint32(const char *cp) ATTR_PURE ATTR_NONNULL((1)); void set_uint16(char *cp, uint16_t v) ATTR_NONNULL((1)); void set_uint32(char *cp, uint32_t v) ATTR_NONNULL((1)); -int set_max_file_descriptors(unsigned long limit, int *max); +#if !defined(HAVE_RLIM_T) +typedef unsigned long rlim_t; +#endif +int set_max_file_descriptors(rlim_t limit, int *max); int switch_id(const char *user, const char *group); #ifdef HAVE_PWD_H char *get_user_homedir(const char *username); |