File: fix-ftbfs-mysql.patch

package info (click to toggle)
libnss-mysql 1.6.1-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 476 kB
  • sloc: ansic: 1,667; sql: 295; makefile: 45; sh: 30
file content (36 lines) | stat: -rw-r--r-- 1,056 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From: Simon Quigley <tsimonq2@ubuntu.com>, Simon Josefsson <simon@josefsson.org>
Subject: Fix FTBFS with later versions of MySQL which replace my_bool with the standard C bool.
Bug: https://savannah.nongnu.org/support/index.php?111301
Last-Update: 2025-08-16
Forwarded: yes

diff --git a/src/mysql.c b/src/mysql.c
index b6593be..0b3073e 100644
--- a/src/mysql.c
+++ b/src/mysql.c
@@ -24,6 +24,7 @@
 #include "nss_mysql.h"
 #include <string.h>             /* strlen() */
 #include <netinet/in.h>         /* struct sockaddr_in */
+#include <stdbool.h>
 
 con_info_t ci = { nfalse };
 extern conf_t conf;
@@ -132,7 +133,7 @@ _nss_mysql_set_options (sql_server_t *server)
 {
   DN ("_nss_mysql_set_options");
   const unsigned int def_timeout = DEF_TIMEOUT;
-  const my_bool reconnect = 1;
+  const bool reconnect = 1;
 
   DENTER;
 
@@ -192,7 +193,7 @@ _nss_mysql_connect_sql (MYSQL_RES **mresult)
   int retval;
   sql_server_t *server = &conf.sql.server;
   unsigned int port;
-  const my_bool noreconnect = 0;
+  const bool noreconnect = 0;
 
   DENTER;