]> granicus.if.org Git - fcron/commitdiff
use #ifdef HAVE_PUTENV
authorthib <thib>
Wed, 13 Sep 2000 15:38:48 +0000 (15:38 +0000)
committerthib <thib>
Wed, 13 Sep 2000 15:38:48 +0000 (15:38 +0000)
job.c

diff --git a/job.c b/job.c
index 66130c29171c65c6892ffd662943c8d3be366d25..1d3ce7cf7f6706f135d21a7c4e89f8f86da83efd 100644 (file)
--- a/job.c
+++ b/job.c
@@ -22,7 +22,7 @@
  *  `LICENSE' that comes with the fcron source distribution.
  */
 
- /* $Id: job.c,v 1.22 2000-09-05 19:55:57 thib Exp $ */
+ /* $Id: job.c,v 1.23 2000-09-13 15:38:48 thib Exp $ */
 
 #include "fcron.h"
 
@@ -46,7 +46,7 @@ change_user(uid_t uid)
     if ((pas = getpwuid(uid)) == NULL) 
         die("failed to get passwd fields for user's uid %d", uid);
     
-#ifdef __linux__
+#ifdef HAVE_SETENV
     setenv("USER", pas->pw_name, 1);
     setenv("HOME", pas->pw_dir, 1);
     setenv("SHELL", pas->pw_shell, 1);
@@ -60,7 +60,7 @@ change_user(uid_t uid)
        strcat( strcpy(buf, "SHELL"), "=");
        putenv( strncat(buf, pas->pw_name, sizeof(buf)-6) );
     }
-#endif /* __linux__ */
+#endif /* HAVE_SETENV */
 
     /* Change running state to the user in question */