trilogy 2.12.3 → 2.12.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fa36a557267f48200ff5975ab9cfc39fb622e24384aa77f961f7bc0197c078a2
4
- data.tar.gz: d1acd64b809a0804cb75009bea299594c71e60dd0fe75f8f8301a6297c9e831c
3
+ metadata.gz: fb255b4a759f25f1ddbf289fb3d17e163cd4efa1dcdf0537d3c9bafeac7183ab
4
+ data.tar.gz: 8d89ef7ec7d5a11cc480a3f6fc0c7ba96c4baa761dccb0b773b88cc382897ea8
5
5
  SHA512:
6
- metadata.gz: e6ff1273859894b6ef26a5d014061ca629a4c80d3c727a3c371b87e6d419c527b73388004a8ab411d6d0abb8a8e7dc73f005a6d60c2b5fafd9bc63667198a265
7
- data.tar.gz: 246cf24d324fd83923269542b0ed7e44e20d76bcff0b89995c02baf6e00edb3ea982bf3d35af080364a5d78f595f01181c0f22338949222477cd26757bb17d88
6
+ metadata.gz: 14bd176ad7f6289bb38b42036344b94800831699b82807464f6ee124e7d31c9a17fa474cabf342ae0c8b549f664062aa0dd52b14e75b06c65c1ff717520e9fda
7
+ data.tar.gz: 7928348c8d89a3e0a5ad5dec06503a9ba3111f0e4f33e4d1448a85407c614c98adbd3adbe4e2e6c763654747a1a484c7437c3cea6c853b448eb105335c8dfb78
@@ -467,6 +467,17 @@ escape the GVL on each wait operation without going through call_without_gvl */
467
467
  return TRILOGY_ERR;
468
468
  }
469
469
 
470
+ int flags = fcntl(fd, F_GETFD); /* should not fail except EBADF. */
471
+ if (flags == -1) {
472
+ close(newfd);
473
+ return TRILOGY_ERR;
474
+ }
475
+
476
+ if (fcntl(newfd, F_SETFD, flags) != 0){
477
+ close(newfd);
478
+ return TRILOGY_ERR;
479
+ }
480
+
470
481
  rc = trilogy_connect_set_fd(&ctx->conn, sock, newfd);
471
482
  if (rc < 0) {
472
483
  trilogy_sock_close(sock);
@@ -10,7 +10,17 @@ File.binwrite("trilogy.c",
10
10
  }.join)
11
11
 
12
12
  $objs = %w[trilogy.o cast.o cext.o]
13
- append_cflags(["-I #{__dir__}/inc", "-std=gnu99", "-fvisibility=hidden", "-DTRILOGY_XALLOCATOR", "-g"])
13
+ append_cflags([
14
+ # Ref: https://github.com/trilogy-libraries/trilogy/issues/290
15
+ # Fix build on older ruby versions and Xcode 26.4+
16
+ "-Wno-default-const-init-field-unsafe",
17
+
18
+ "-I#{__dir__}/inc",
19
+ "-std=gnu99",
20
+ "-fvisibility=hidden",
21
+ "-DTRILOGY_XALLOCATOR",
22
+ "-g",
23
+ ])
14
24
 
15
25
  dir_config("openssl").any? || pkg_config("openssl")
16
26
 
@@ -1,3 +1,3 @@
1
1
  class Trilogy
2
- VERSION = "2.12.3"
2
+ VERSION = "2.12.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trilogy
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.12.3
4
+ version: 2.12.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitHub Engineering
@@ -87,7 +87,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
87
87
  - !ruby/object:Gem::Version
88
88
  version: '0'
89
89
  requirements: []
90
- rubygems_version: 4.0.6
90
+ rubygems_version: 4.0.11
91
91
  specification_version: 4
92
92
  summary: A friendly MySQL-compatible library for Ruby, binding to libtrilogy
93
93
  test_files: []