summaryrefslogtreecommitdiffstats
path: root/arch/um/drivers/slirp_user.c
diff options
context:
space:
mode:
authorHans-Werner Hilse <hwhilse@gmail.com>2015-06-11 11:29:19 +0200
committerRichard Weinberger <richard@nod.at>2015-06-25 22:42:19 +0200
commitf9bb3b5947c507d402eecbffabb8fb0864263ad1 (patch)
tree82e1167c87b395d3bcb2ef3cd1e73236d1cf9527 /arch/um/drivers/slirp_user.c
parentum: Do not use __ptr_t type for stack_t's .ss pointer (diff)
downloadlinux-f9bb3b5947c507d402eecbffabb8fb0864263ad1.tar.xz
linux-f9bb3b5947c507d402eecbffabb8fb0864263ad1.zip
um: Do not use stdin and stdout identifiers for struct members
stdin, stdout and stderr are macros according to C89/C99. Thus do not use them as struct member identifiers to avoid bad results from macro expansion. Signed-off-by: Hans-Werner Hilse <hwhilse@gmail.com> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um/drivers/slirp_user.c')
-rw-r--r--arch/um/drivers/slirp_user.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/um/drivers/slirp_user.c b/arch/um/drivers/slirp_user.c
index c999d187abb9..98b6a41a254e 100644
--- a/arch/um/drivers/slirp_user.c
+++ b/arch/um/drivers/slirp_user.c
@@ -20,18 +20,18 @@ static int slirp_user_init(void *data, void *dev)
}
struct slirp_pre_exec_data {
- int stdin;
- int stdout;
+ int stdin_fd;
+ int stdout_fd;
};
static void slirp_pre_exec(void *arg)
{
struct slirp_pre_exec_data *data = arg;
- if (data->stdin != -1)
- dup2(data->stdin, 0);
- if (data->stdout != -1)
- dup2(data->stdout, 1);
+ if (data->stdin_fd != -1)
+ dup2(data->stdin_fd, 0);
+ if (data->stdout_fd != -1)
+ dup2(data->stdout_fd, 1);
}
static int slirp_tramp(char **argv, int fd)
@@ -39,8 +39,8 @@ static int slirp_tramp(char **argv, int fd)
struct slirp_pre_exec_data pe_data;
int pid;
- pe_data.stdin = fd;
- pe_data.stdout = fd;
+ pe_data.stdin_fd = fd;
+ pe_data.stdout_fd = fd;
pid = run_helper(slirp_pre_exec, &pe_data, argv);
return pid;