Description

Building the db_sqlite or db_unixodbc modules on Alpine 3.20 fails. This is the error for db_unixodbc. The error for db_sqlite is a similar nature

dbase.c:261:32: error: passing argument 2 of 'db_do_close' from incompatible pointer type [-Wincompatible-pointer-types]
  261 |         return db_do_close(_h, db_unixodbc_free_connection);
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                |
      |                                void (*)(struct my_con *)
In file included from val.h:34,
                 from dbase.c:33:
../../lib/srdb1/db.h:495:40: note: expected 'void (*)(struct pool_con *)' but argument is of type 'void (*)(struct my_con *)'
  495 | void db_do_close(db1_con_t *_h, void (*free_connection)(struct pool_con *));
      |  

I notice that it looks like a fix exists for this and I'm guessing it's not backported?

https://kamailio.org/mailman3/hyperkitty/list/sr-dev@lists.kamailio.org/message/B5RVWGHG6EWWAV5RL377FSVNUOVRYEP5/

Troubleshooting

Reproduction

Follow normal build instructions on Alpine including either of these modules. This does not occur in Alpine 3.20

Possible Solutions

I'm hoping the patch indicated in the link above would address the issue in 5.8.6. If there's any complier options, etc. that can be changed to address it as well that would be good to know.

Alpine 3.21 ( docker image alpine:3.21)


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <kamailio/kamailio/issues/4121@github.com>