mirror of
https://github.com/slicer69/doas
synced 2024-10-15 12:13:08 +00:00
Minor fixes to avoid compiling error on FreeBSD following Linux fixes.
This commit is contained in:
parent
c8cb4d999e
commit
fd79e385d7
6
doas.c
6
doas.c
|
@ -510,17 +510,17 @@ main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
pam_end(pamh, pam_err);
|
pam_end(pamh, pam_err);
|
||||||
|
|
||||||
/* #ifndef linux */
|
#ifndef linux
|
||||||
/* Re-establish stdin */
|
/* Re-establish stdin */
|
||||||
if (dup2(temp_stdin, STDIN_FILENO) == -1)
|
if (dup2(temp_stdin, STDIN_FILENO) == -1)
|
||||||
err(1, "dup2");
|
err(1, "dup2");
|
||||||
close(temp_stdin);
|
close(temp_stdin);
|
||||||
/* #else */
|
#else
|
||||||
/* Re-establish stdout */
|
/* Re-establish stdout */
|
||||||
close(1);
|
close(1);
|
||||||
if (dup2(temp_stdout, 1) == -1)
|
if (dup2(temp_stdout, 1) == -1)
|
||||||
err(1, "dup2");
|
err(1, "dup2");
|
||||||
/* #endif */
|
#endif
|
||||||
#else
|
#else
|
||||||
#error No auth module!
|
#error No auth module!
|
||||||
#endif
|
#endif
|
||||||
|
|
4
env.c
4
env.c
|
@ -90,7 +90,9 @@ createenv(struct rule *rule)
|
||||||
env->count = 0;
|
env->count = 0;
|
||||||
|
|
||||||
if (rule->options & KEEPENV) {
|
if (rule->options & KEEPENV) {
|
||||||
/* extern const char **environ; */
|
#ifndef linux
|
||||||
|
extern const char **environ;
|
||||||
|
#endif
|
||||||
|
|
||||||
for (i = 0; environ[i] != NULL; i++) {
|
for (i = 0; environ[i] != NULL; i++) {
|
||||||
struct envnode *node;
|
struct envnode *node;
|
||||||
|
|
Loading…
Reference in a new issue