diff options
author | emersion <contact@emersion.fr> | 2018-12-13 08:13:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-13 08:13:23 +0100 |
commit | 8a56b96c5516ee089b7561949aac4f83e5b94808 (patch) | |
tree | 5a0ef0774eba143d8aaecc81533a96fd5ab56501 /xwayland | |
parent | ef9506b0bc009a19ee871333bd40f1ba0c0a2aa9 (diff) | |
parent | 384642b3942397c89253796f45052537eca2a422 (diff) |
Merge pull request #1434 from martinetd/xwayland_clearenv
xwayland: remove clearenv() call
Diffstat (limited to 'xwayland')
-rw-r--r-- | xwayland/xwayland.c | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/xwayland/xwayland.c b/xwayland/xwayland.c index e6d3502c..e6f15735 100644 --- a/xwayland/xwayland.c +++ b/xwayland/xwayland.c @@ -1,4 +1,4 @@ -#define _DEFAULT_SOURCE +#define _POSIX_C_SOURCE 200112L #ifdef __FreeBSD__ // for SOCK_CLOEXEC #define __BSD_VISIBLE 1 @@ -21,14 +21,6 @@ #include "util/signal.h" #include "xwayland/xwm.h" -#ifdef __FreeBSD__ -static inline int clearenv(void) { - extern char **environ; - environ[0] = NULL; - return 0; -} -#endif - struct wlr_xwayland_cursor { uint8_t *pixels; uint32_t stride; @@ -102,17 +94,6 @@ static void exec_xwayland(struct wlr_xwayland *wlr_xwayland) { _exit(EXIT_FAILURE); } - const char *xdg_runtime = getenv("XDG_RUNTIME_DIR"); - const char *path_var = getenv("PATH"); - if (clearenv() != 0) { - wlr_log_errno(WLR_ERROR, "clearenv failed"); - _exit(EXIT_FAILURE); - } - if (xdg_runtime != NULL) { - setenv("XDG_RUNTIME_DIR", xdg_runtime, true); - } - setenv("PATH", path_var, true); - char wayland_socket_str[16]; snprintf(wayland_socket_str, sizeof(wayland_socket_str), "%d", wlr_xwayland->wl_fd[1]); setenv("WAYLAND_SOCKET", wayland_socket_str, true); |