From: Ben Gras Date: Mon, 3 Apr 2006 18:31:27 +0000 (+0000) Subject: setenv() compiler fixes X-Git-Tag: v3.1.2a~78 X-Git-Url: http://zhaoyanbai.com/repos/man.dnssec-keyfromlabel.html?a=commitdiff_plain;h=87dbe50e8c0274a47f1b7829fef47a393e0bf806;p=minix.git setenv() compiler fixes --- diff --git a/commands/cron/cron.c b/commands/cron/cron.c index 71e43dac1..1a09c2f40 100755 --- a/commands/cron/cron.c +++ b/commands/cron/cron.c @@ -3,6 +3,7 @@ */ #define _MINIX_SOURCE +#define _MINIX 1 #define nil ((void*)0) #include @@ -189,11 +190,11 @@ static void run_job(cronjob_t *job) setgid(pw->pw_gid); setuid(pw->pw_uid); chdir(pw->pw_dir); - if (setenv("USER", pw->pw_name) < 0) goto bad; - if (setenv("LOGNAME", pw->pw_name) < 0) goto bad; - if (setenv("HOME", pw->pw_dir) < 0) goto bad; + if (setenv("USER", pw->pw_name, 1) < 0) goto bad; + if (setenv("LOGNAME", pw->pw_name, 1) < 0) goto bad; + if (setenv("HOME", pw->pw_dir, 1) < 0) goto bad; if (setenv("SHELL", pw->pw_shell[0] == 0 ? "/bin/sh" - : pw->pw_shell) < 0) goto bad; + : pw->pw_shell, 1) < 0) goto bad; } if (job->atjob) {