Commit 57104e5d authored by Anders Blomdell's avatar Anders Blomdell
Browse files

Fix dlopen problems with old comedilib

parent c4fbf910
......@@ -61,9 +61,9 @@ struct moberg_device *moberg_device_new(struct moberg *moberg,
char *name = malloc(strlen("") + strlen(driver) + 1);
if (!name) { goto out; }
sprintf(name, "", 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 =
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/%)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment