Skip to content

Commit 125564c

Browse files
authored
db.mysql: improve documentation for support on OpenBSD (#26315)
1 parent cd70ee3 commit 125564c

2 files changed

Lines changed: 13 additions & 4 deletions

File tree

‎vlib/db/mysql/README.md‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
## Purpose:
1+
## Purpose
2+
23
The db.mysql module can be used to develop software that connects to the popular open source
34
MySQL or MariaDB database servers.
45

5-
### Local setup of a development server:
6+
### Local setup of a development server
7+
68
To run the mysql module tests, or if you want to just experiment, you can use the following
79
command to start a development version of MySQL using docker:
810
```sh
@@ -18,9 +20,12 @@ Use `docker container stop some-mysql` to stop the server.
1820

1921
Use `docker container rm some-mysql` to remove it completely, after it is stopped.
2022

21-
### Installation of development dependencies:
23+
### Installation of development dependencies
24+
2225
For Linux, you need to install `MySQL development` package and `pkg-config`.
2326

27+
For OpenBSD, you need to install the `mariadb-client` package.
28+
2429
For Windows, install [the installer](https://dev.mysql.com/downloads/installer/) ,
2530
then copy the `include` and `lib` folders to `<V install directory>\thirdparty\mysql`.
2631

‎vlib/db/mysql/_cdefs_nix.c.v‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ $if $pkgconfig('mysqlclient') {
88
#include <mysql.h> # Please install the libmysqlclient-dev development headers
99
} $else $if $pkgconfig('mariadb') {
1010
#pkgconfig mariadb
11-
#include <mysql.h> # Please install the libmariadb-dev development headers
11+
$if openbsd {
12+
#include <mysql.h> # Please install the mariadb-client package for development headers
13+
} $else {
14+
#include <mysql.h> # Please install the libmariadb-dev development headers
15+
}
1216
} $else $if $pkgconfig('libmariadb') {
1317
#pkgconfig libmariadb
1418
#include <mysql.h> # Please install the mariadb client

0 commit comments

Comments
 (0)