View | Details | Raw Unified
Collapse All | Expand All

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