Skip to content
Snippets Groups Projects
Commit 57104e5d authored by Anders Blomdell's avatar Anders Blomdell
Browse files

Fix dlopen problems with old comedilib

parent c4fbf910
Branches
Tags
No related merge requests found
......@@ -61,9 +61,9 @@ struct moberg_device *moberg_device_new(struct moberg *moberg,
char *name = malloc(strlen("libmoberg_.so") + strlen(driver) + 1);
if (!name) { goto out; }
sprintf(name, "libmoberg_%s.so", driver);
void *handle = dlopen(name, RTLD_LAZY || RTLD_DEEPBIND);
void *handle = dlopen(name, RTLD_LAZY | RTLD_DEEPBIND);
if (! handle) {
fprintf(stderr, "Could not find driver %s\n", name);
fprintf(stderr, "Could not find driver %s %s\n", name, dlerror());
goto free_name;
}
struct moberg_device_driver *device_driver =
......
LIBRARIES=libmoberg_comedi.so
CCFLAGS+=-Wall -Werror -I../.. -I. -O3 -g -fPIC
LDFLAGS+=-Lbuild/ -lmoberg
LDFLAGS_comedi=-shared -fPIC -L../../build -lmoberg
LDFLAGS_comedi=-shared -fPIC -L../../build -lmoberg -lcomedi -lm
all: $(LIBRARIES:%=build/%)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment