Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 156146
Collapse All | Expand All

(-)euses-2.5.2/euses.c (-2 / +5 lines)
Lines 128-137 Link Here
128
	FILE *fd;
128
	FILE *fd;
129
129
130
	/* Check if PORTDIR is set in the environment */
130
	/* Check if PORTDIR is set in the environment */
131
	snprintf(portdir, FILENAME_MAX, "%s", getenv("PORTDIR"));
131
	char *envportdir = getenv("PORTDIR");
132
	if (envportdir != NULL) {
133
		snprintf(portdir, FILENAME_MAX, "%s", envportdir);
134
	}
132
135
133
	/* or load it from make.{globals,conf} */
136
	/* or load it from make.{globals,conf} */
134
	if (strlen(portdir) == 0) {
137
	else {
135
		/* Open a pipe to sh */
138
		/* Open a pipe to sh */
136
		fd = popen("source " SYSCONFDIR "/make.globals;" "source "
139
		fd = popen("source " SYSCONFDIR "/make.globals;" "source "
137
			   SYSCONFDIR "/make.conf" ";" "echo -n ${PORTDIR}",
140
			   SYSCONFDIR "/make.conf" ";" "echo -n ${PORTDIR}",

Return to bug 156146