From 6dd85beaf95eee881a6c244c41e5fd5db17cdf9e Mon Sep 17 00:00:00 2001 From: Emmanuel Dreyfus Date: Thu, 13 Dec 2012 15:55:40 +0100 Subject: Spurious reserved port warning fix reserved ports is a Linux specitic concept. Make no warnings for other systems. BUG: 815227 Signed-off-by: Emmanuel Dreyfus Change-Id: I40037b9e99e7fcbdd0d153865ee7c2ef3733132e Reviewed-on: http://review.gluster.org/4308 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- libglusterfs/src/common-utils.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'libglusterfs') diff --git a/libglusterfs/src/common-utils.c b/libglusterfs/src/common-utils.c index c327d4fe43c..22f13861451 100644 --- a/libglusterfs/src/common-utils.c +++ b/libglusterfs/src/common-utils.c @@ -2197,10 +2197,11 @@ generate_glusterfs_ctx_id (void) char * gf_get_reserved_ports () { + char *ports_info = NULL; +#if defined GF_LINUX_HOST_OS int proc_fd = -1; char *proc_file = "/proc/sys/net/ipv4/ip_local_reserved_ports"; char buffer[4096] = {0,}; - char *ports_info = NULL; int32_t ret = -1; proc_fd = open (proc_file, O_RDONLY); @@ -2229,6 +2230,7 @@ gf_get_reserved_ports () out: if (proc_fd != -1) close (proc_fd); +#endif /* GF_LINUX_HOST_OS */ return ports_info; } @@ -2236,6 +2238,7 @@ int gf_process_reserved_ports (gf_boolean_t *ports) { int ret = -1; +#if defined GF_LINUX_HOST_OS char *ports_info = NULL; char *tmp = NULL; char *blocked_port = NULL; @@ -2265,6 +2268,7 @@ gf_process_reserved_ports (gf_boolean_t *ports) out: GF_FREE (ports_info); +#endif /* GF_LINUX_HOST_OS */ return ret; } -- cgit