1
0
mirror of https://github.com/slicer69/doas synced 2024-07-09 03:55:50 +00:00

Minor fixes to avoid compiling error on FreeBSD following Linux fixes.

This commit is contained in:
Jesse Smith 2019-03-10 19:22:09 -03:00
parent c8cb4d999e
commit fd79e385d7
2 changed files with 6 additions and 4 deletions

6
doas.c
View File

@ -510,17 +510,17 @@ main(int argc, char **argv)
}
pam_end(pamh, pam_err);
/* #ifndef linux */
#ifndef linux
/* Re-establish stdin */
if (dup2(temp_stdin, STDIN_FILENO) == -1)
err(1, "dup2");
close(temp_stdin);
/* #else */
#else
/* Re-establish stdout */
close(1);
if (dup2(temp_stdout, 1) == -1)
err(1, "dup2");
/* #endif */
#endif
#else
#error No auth module!
#endif

4
env.c
View File

@ -90,7 +90,9 @@ createenv(struct rule *rule)
env->count = 0;
if (rule->options & KEEPENV) {
/* extern const char **environ; */
#ifndef linux
extern const char **environ;
#endif
for (i = 0; environ[i] != NULL; i++) {
struct envnode *node;