GNU bug report logs -
#79179
[PATCH 0/2] mariadb-connector-c: Fix build problems
Previous Next
Full log
View this message in rfc822 format
Without the '#include <unistd.h>' in these files, the build phase fails with
the `[-Wimplicit-function-declaration]` error, specifically for the `lseek`
and `close` functions.
This commit adds the line to the following files just before the build phase:
- zlib/gzlib.c
- zlib/gzread.c
- zlib/gzwrite.c
Change-Id: I4bc4ee8e54bc39051b4fa19cf05b70233284e5b6
---
gnu/packages/databases.scm | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index a13dcd2c178..79051c5d8fd 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -1324,7 +1324,20 @@ (define-public mariadb-connector-c
(list openssl))
(build-system cmake-build-system)
(arguments
- '(#:tests? #f)) ; no tests
+ `(#:tests? #f ; no tests
+ #:phases (modify-phases %standard-phases
+ (add-before 'build 'include-unistd-h
+ (lambda* (#:key source #:allow-other-keys)
+ (substitute* (map (lambda (filename)
+ (string-append "../mariadb-connector-c-"
+ ,version
+ "-src/zlib/"
+ filename))
+ '("gzlib.c" "gzread.c" "gzwrite.c"))
+ (("#include \"gzguts.h\"")
+ (string-append "#include <unistd.h>"
+ "\n"
+ "#include \"gzguts.h\""))))))))
(home-page "https://mariadb.com/kb/en/mariadb-connector-c/")
(synopsis "Client library to connect to MySQL or MariaDB")
(description "The MariaDB Connector/C is used to connect applications
--
2.41.0
This bug report was last modified 8 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.