Commit 160e8ad6 authored by Ivan Mincik's avatar Ivan Mincik
Browse files

grass: drop clang integer patch

Problem is fixed in
https://github.com/OSGeo/grass/pull/3325

Closes #340475
parent f0d832e3
Loading
Loading
Loading
Loading
+0 −21
Original line number Diff line number Diff line
diff -ur a/db/drivers/mysql/db.c b/db/drivers/mysql/db.c
--- a/db/drivers/mysql/db.c	1969-12-31 19:00:01.000000000 -0500
+++ b/db/drivers/mysql/db.c	2023-11-09 23:26:25.329700495 -0500
@@ -52,9 +52,16 @@
 
         db_get_login2("mysql", name, &user, &password, &host, &port);
 
+        const char* errstr;
+        unsigned int port_number = (unsigned int)strtonum(port, 0, 65536, &errstr);
+        if (errstr != NULL) {
+            db_d_append_error("%s", errstr);
+            return DB_FAILED;
+        }
+
         connection = mysql_init(NULL);
         res = mysql_real_connect(connection, host, user, password,
-                                 connpar.dbname, port, NULL, 0);
+                                 connpar.dbname, port_number, NULL, 0);
 
         if (res == NULL) {
             db_d_append_error("%s\n%s", _("Connection failed."),
+0 −5
Original line number Diff line number Diff line
@@ -90,11 +90,6 @@ stdenv.mkDerivation (finalAttrs: {

  strictDeps = true;

  patches = lib.optionals stdenv.isDarwin [
    # Fix conversion of const char* to unsigned int.
    ./clang-integer-conversion.patch
  ];

  configureFlags = [
    "--with-blas"
    "--with-cairo-ldflags=-lfontconfig"