Skip to content

Commit bf5ae4b

Browse files
committed
Test
Signed-off-by: Salil Chandra <[email protected]>
1 parent 5ec9585 commit bf5ae4b

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

cdb2api/cdb2api_int.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,14 @@ void cdb2_socket_pool_donate_ext(cdb2_hndl_tp *hndl, const char *typestr, int fd
3030
int cdb2_send_2pc(cdb2_hndl_tp *hndl, char *dbname, char *pname, char *ptier, char *source, unsigned int op,
3131
char *dist_txnid, int rcode, int outrc, char *errmsg, int async);
3232

33+
#ifndef WITH_DL_LIBS
34+
// #define WITH_DL_LIBS 0
35+
#define WITH_DL_LIBS 1
36+
#endif
37+
38+
#if WITH_DL_LIBS
39+
void cdb2_set_install_libs(void (*ptr)(const char *));
40+
void cdb2_set_uninstall_libs(void (*ptr)(const char *));
41+
#endif
42+
3343
#endif

tests/tools/api_libs.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
#include <stdio.h>
22
#include <stdlib.h>
33
#include <cdb2api.h>
4+
#include <cdb2api_int.h>
45

56
typedef void (lib_cb)(void);
6-
void cdb2_set_install_libs(lib_cb *);
7-
void cdb2_set_uninstall_libs(lib_cb *);
87

98
static void *my_open_hook(cdb2_hndl_tp *hndl, void *user_arg, int argc, void **argv)
109
{
@@ -15,7 +14,7 @@ static void *my_open_hook(cdb2_hndl_tp *hndl, void *user_arg, int argc, void **a
1514
static cdb2_event *e;
1615

1716
static int inited = 0;
18-
void gbl_init_once(void)
17+
void gbl_init_once(const char *unused)
1918
{
2019
if (inited)
2120
return;
@@ -25,7 +24,7 @@ void gbl_init_once(void)
2524
inited = 1;
2625
}
2726

28-
void gbl_uninit(void)
27+
void gbl_uninit(const char *unused)
2928
{
3029
if (!inited)
3130
return;

0 commit comments

Comments
 (0)