aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/support
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/support')
-rw-r--r--src/core/support/avl.c4
-rw-r--r--src/core/support/env_linux.c5
-rw-r--r--src/core/support/time_posix.c2
3 files changed, 8 insertions, 3 deletions
diff --git a/src/core/support/avl.c b/src/core/support/avl.c
index 9734c9987f..f378b3ee17 100644
--- a/src/core/support/avl.c
+++ b/src/core/support/avl.c
@@ -1,6 +1,6 @@
/*
*
- * Copyright 2015, Google Inc.
+ * Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -167,7 +167,7 @@ static gpr_avl_node *rotate_right_left(const gpr_avl_vtable *vtable, void *key,
vtable->copy_key(right->left->key),
vtable->copy_value(right->left->value),
new_node(key, value, left, ref_node(right->left->left)),
- new_node(vtable->copy_key(right->key), vtable->copy_key(right->value),
+ new_node(vtable->copy_key(right->key), vtable->copy_value(right->value),
ref_node(right->left->right), ref_node(right->right)));
unref_node(vtable, right);
return n;
diff --git a/src/core/support/env_linux.c b/src/core/support/env_linux.c
index 442cd8298e..1ca6fa1aff 100644
--- a/src/core/support/env_linux.c
+++ b/src/core/support/env_linux.c
@@ -52,6 +52,7 @@
#include "src/core/support/string.h"
char *gpr_getenv(const char *name) {
+#if defined(GPR_BACKWARDS_COMPATIBILITY_MODE)
typedef char *(*getenv_type)(const char *);
static getenv_type getenv_func = NULL;
/* Check to see which getenv variant is supported (go from most
@@ -62,6 +63,10 @@ char *gpr_getenv(const char *name) {
}
char *result = getenv_func(name);
return result == NULL ? result : gpr_strdup(result);
+#else
+ char *result = secure_getenv(name);
+ return result == NULL ? result : gpr_strdup(result);
+#endif
}
void gpr_setenv(const char *name, const char *value) {
diff --git a/src/core/support/time_posix.c b/src/core/support/time_posix.c
index 1f92d7f090..36d75e7da2 100644
--- a/src/core/support/time_posix.c
+++ b/src/core/support/time_posix.c
@@ -86,7 +86,7 @@ gpr_timespec gpr_now(gpr_clock_type clock_type) {
gpr_precise_clock_now(&ret);
return ret;
} else {
-#if defined(__linux__) && !defined(GPR_NO_DIRECT_SYSCALLS)
+#if defined(GPR_BACKWARDS_COMPATIBILITY_MODE) && defined(__linux__)
/* avoid ABI problems by invoking syscalls directly */
syscall(SYS_clock_gettime, clockid_for_gpr_clock[clock_type], &now);
#else