diff options
author | Hans-Werner Hilse <hwhilse@gmail.com> | 2015-06-11 05:29:19 -0400 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2015-06-25 16:42:19 -0400 |
commit | f9bb3b5947c507d402eecbffabb8fb0864263ad1 (patch) | |
tree | 82e1167c87b395d3bcb2ef3cd1e73236d1cf9527 /arch/um/os-Linux | |
parent | 9a75551aeaa8c79fd6ad713cb20e6bbccc767331 (diff) |
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/os-Linux')
-rw-r--r-- | arch/um/os-Linux/drivers/tuntap_user.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/um/os-Linux/drivers/tuntap_user.c b/arch/um/os-Linux/drivers/tuntap_user.c index 14126d9176aa..c2e6e1dad876 100644 --- a/arch/um/os-Linux/drivers/tuntap_user.c +++ b/arch/um/os-Linux/drivers/tuntap_user.c | |||
@@ -47,7 +47,7 @@ static void tuntap_del_addr(unsigned char *addr, unsigned char *netmask, | |||
47 | } | 47 | } |
48 | 48 | ||
49 | struct tuntap_pre_exec_data { | 49 | struct tuntap_pre_exec_data { |
50 | int stdout; | 50 | int stdout_fd; |
51 | int close_me; | 51 | int close_me; |
52 | }; | 52 | }; |
53 | 53 | ||
@@ -55,7 +55,7 @@ static void tuntap_pre_exec(void *arg) | |||
55 | { | 55 | { |
56 | struct tuntap_pre_exec_data *data = arg; | 56 | struct tuntap_pre_exec_data *data = arg; |
57 | 57 | ||
58 | dup2(data->stdout, 1); | 58 | dup2(data->stdout_fd, 1); |
59 | close(data->close_me); | 59 | close(data->close_me); |
60 | } | 60 | } |
61 | 61 | ||
@@ -74,7 +74,7 @@ static int tuntap_open_tramp(char *gate, int *fd_out, int me, int remote, | |||
74 | 74 | ||
75 | sprintf(version_buf, "%d", UML_NET_VERSION); | 75 | sprintf(version_buf, "%d", UML_NET_VERSION); |
76 | 76 | ||
77 | data.stdout = remote; | 77 | data.stdout_fd = remote; |
78 | data.close_me = me; | 78 | data.close_me = me; |
79 | 79 | ||
80 | pid = run_helper(tuntap_pre_exec, &data, argv); | 80 | pid = run_helper(tuntap_pre_exec, &data, argv); |