mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
Fix the previous commit (still not used to svn vs. cvs). Use the
define from paths.h for the default temporary directory and remove and unneccessary getenv call.
This commit is contained in:
parent
9965153d75
commit
cd7215ceba
1 changed files with 2 additions and 4 deletions
|
|
@ -115,6 +115,7 @@ __FBSDID("$FreeBSD$");
|
|||
#include <fcntl.h>
|
||||
#include <inttypes.h>
|
||||
#include <limits.h>
|
||||
#include <paths.h>
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
#include <stdlib.h>
|
||||
|
|
@ -139,7 +140,6 @@ __FBSDID("$FreeBSD$");
|
|||
#include "var.h"
|
||||
|
||||
#define TMPPAT "makeXXXXXXXXXX"
|
||||
#define TMPDIR "/tmp"
|
||||
|
||||
#ifndef USE_KQUEUE
|
||||
/*
|
||||
|
|
@ -1611,7 +1611,7 @@ JobStart(GNode *gn, int flags, Job *previous)
|
|||
}
|
||||
|
||||
if ((tdir = getenv("TMPDIR")) == NULL)
|
||||
tdir = TMPDIR;
|
||||
tdir = _PATH_TMP;
|
||||
|
||||
/*
|
||||
* If the -n flag wasn't given, we open up OUR (not the child's)
|
||||
|
|
@ -1807,8 +1807,6 @@ JobStart(GNode *gn, int flags, Job *previous)
|
|||
} else {
|
||||
fprintf(stdout, "Remaking `%s'\n", gn->name);
|
||||
fflush(stdout);
|
||||
if ((tdir = getenv("TMPDIR")) == NULL)
|
||||
tdir = TMPDIR;
|
||||
snprintf(job->outFile, sizeof(job->outFile), "%s/%s",
|
||||
tdir, TMPPAT);
|
||||
if ((job->outFd = mkstemp(job->outFile)) == -1)
|
||||
|
|
|
|||
Loading…
Reference in a new issue