mirror of
https://github.com/jorisvink/kore
synced 2025-03-09 12:39:01 -04:00
build kore as -rdynamic so we can properly load modules.
implement kore_module_handler_find().
This commit is contained in:
parent
d9bbb0b1f1
commit
a39040ba9b
2
Makefile
2
Makefile
@ -11,7 +11,7 @@ CFLAGS+=-I/usr/local/ssl/include
|
||||
CFLAGS+=-Wall -Wstrict-prototypes -Wmissing-prototypes
|
||||
CFLAGS+=-Wmissing-declarations -Wshadow -Wpointer-arith -Wcast-qual
|
||||
CFLAGS+=-Wsign-compare -Iincludes -g
|
||||
LDFLAGS=-Llibs -lssl -lcrypto -ldl -lz
|
||||
LDFLAGS=-rdynamic -Llibs -lssl -lcrypto -ldl -lz
|
||||
|
||||
light: $(S_OBJS)
|
||||
$(CC) $(CFLAGS) $(S_OBJS) $(LDFLAGS) -o $(BIN)
|
||||
|
@ -97,5 +97,12 @@ kore_module_handler_new(char *uri, char *func, int type)
|
||||
void *
|
||||
kore_module_handler_find(char *uri)
|
||||
{
|
||||
struct kore_module_handle *hdlr;
|
||||
|
||||
TAILQ_FOREACH(hdlr, &handlers, list) {
|
||||
if (!strcmp(hdlr->uri, uri))
|
||||
return (hdlr->func);
|
||||
}
|
||||
|
||||
return (NULL);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user