Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 417289 | Differences between
and this patch

Collapse All | Expand All

(-)alsa-lib-1.0.24.1/src/dlmisc.c (-1 / +19 lines)
Lines 67-73 Link Here
67
#endif
67
#endif
68
#endif
68
#endif
69
#ifdef HAVE_LIBDL
69
#ifdef HAVE_LIBDL
70
	return dlopen(name, mode);
70
	/*
71
	 * Handle the plugin dir not being on the default dlopen search
72
	 * path, without resorting to polluting the entire system namespace
73
	 * via ld.so.conf.
74
	 */
75
	void *handle = NULL;
76
	char *filename;
77
78
	if (name && name[0] != '/') {
79
		filename = malloc(sizeof(ALSA_PLUGIN_DIR) + 1 + strlen(name) + 1);
80
		strcpy(filename, ALSA_PLUGIN_DIR);
81
		strcat(filename, "/");
82
		strcat(filename, name);
83
		handle = dlopen(filename, mode);
84
		free(filename);
85
	}
86
	if (!handle)
87
		handle = dlopen(name, mode);
88
	return handle;
71
#else
89
#else
72
	return NULL;
90
	return NULL;
73
#endif
91
#endif

Return to bug 417289