{
 "number": 36038,
 "repo": "bitcoin/bitcoin",
 "url": "https://github.com/bitcoin/bitcoin/pull/36038",
 "title": "util: remove usage of `strerror_s/r`",
 "author": "fanquake",
 "author_association": "MEMBER",
 "created_at": "2026-08-20T14:27:11Z",
 "updated_at": "2026-09-16T09:55:09Z",
 "age_days": 28,
 "draft": false,
 "labels": [
  "Utils/log/libs"
 ],
 "milestone": null,
 "base": "master",
 "head_sha": "6f6db82589839ccf42d8c04711ed4666a4c740f9",
 "head_ref": "drop_strerror_r",
 "head_repo": "fanquake/bitcoin",
 "head_history": [
  {
   "t": "2026-08-20T14:35:06Z",
   "sha": "c880e587e87c43f6194a7ed2e86379502318a326"
  },
  {
   "t": "2026-08-20T14:40:36Z",
   "sha": "1ce27d26ea1e20fbf3632b13a28b15c057e7275d"
  },
  {
   "t": "2026-08-20T14:55:45Z",
   "sha": "2227656a81b53caf2a21ccc1a1334b660e9986f1"
  },
  {
   "t": "2026-08-21T12:41:10Z",
   "sha": "4b251dcd9764f1f56c6c49f5eaa3acf6f89e61f1"
  },
  {
   "t": "2026-09-09T08:45:48Z",
   "sha": "f04da080f895c0ef807da9b39c76083698946255"
  },
  {
   "t": "2026-09-11T10:02:21Z",
   "sha": "011fcdceac78ca66b47d181e7375c8711cd7eee1"
  },
  {
   "t": "2026-09-16T09:55:09Z",
   "sha": "6f6db82589839ccf42d8c04711ed4666a4c740f9"
  }
 ],
 "additions": 7,
 "deletions": 67,
 "changed_files": 8,
 "commit_count": 2,
 "size_bucket": "S",
 "mergeable_state": "clean",
 "bot": {
  "drahtbot": {
   "present": true,
   "reviews": {},
   "conflicts": []
  }
 },
 "acks_parsed": {},
 "acks_tally": {
  "ack": 0,
  "stale_ack": 0,
  "concept_ack": 0,
  "approach_ack": 0,
  "nack": 0,
  "concept_nack": 0,
  "approach_nack": 0
 },
 "reviews": {
  "approved": 0,
  "changes_requested": 0,
  "distinct_reviewers": [
   "maflcko"
  ]
 },
 "signals": {
  "needs_rebase": false,
  "ci_failed": false,
  "mergeable_state": "clean",
  "last_author_activity": "2026-09-16T09:55:09Z",
  "last_reviewer_activity": "2026-08-20T14:42:36Z",
  "last_reviewer": "maflcko",
  "author_silent_days": 1,
  "waiting_on_author_days": 0,
  "days_since_update": 1
 },
 "refs": {
  "mentioned": [],
  "depends_on": [],
  "fixes": [],
  "linked_issues": [],
  "references": [],
  "conflicts": []
 },
 "stack": {
  "shares_commits_with": [],
  "based_on": [],
  "base_for": []
 },
 "review_paths": [
  "src/util/syserror.h"
 ],
 "body": "Use `std::system_category().message(err)`, which internally dispatches to `strerror_r/s`, and should handle unknown errors.\n\nSee: https://github.com/llvm/llvm-project/blob/4e9e83400a5702059c8a18e2fb6174038875e8a6/libcxx/src/system_error.cpp#L231-L237 for one standard library implementation.",
 "commits": [
  {
   "sha": "63bc501a0ca800ba504ef0856a575fb20cbc5ba6",
   "date": "2026-09-16T09:54:51Z",
   "message": "util: remove usage of strerror_s/r\n\nUse std::system_category().message(err), which internally dispatches to\nstrerror_r/s, and should handle unknown errors.\n\nSee: https://github.com/llvm/llvm-project/blob/4e9e83400a5702059c8a18e2fb6174038875e8a6/libcxx/src/system_error.cpp#L231"
  },
  {
   "sha": "6f6db82589839ccf42d8c04711ed4666a4c740f9",
   "date": "2026-09-16T09:54:52Z",
   "message": "util: collapse Win32ErrorString into SysErrorString"
  }
 ],
 "timeline": [
  {
   "t": "2026-08-20T14:35:06Z",
   "kind": "force_push",
   "who": "fanquake",
   "commit": "c880e587e87c43f6194a7ed2e86379502318a326"
  },
  {
   "t": "2026-08-20T14:40:36Z",
   "kind": "force_push",
   "who": "fanquake",
   "commit": "1ce27d26ea1e20fbf3632b13a28b15c057e7275d"
  },
  {
   "t": "2026-08-20T14:42:36Z",
   "kind": "review_comment",
   "who": "maflcko",
   "assoc": "MEMBER",
   "path": "src/util/syserror.h",
   "commit": "1ce27d26ea1e20fbf3632b13a28b15c057e7275d",
   "in_reply_to": null,
   "text": "```suggestion\n/// Return system error string from errno value. For network errors\n/// use NetworkErrorString from sock.h instead.\n```\n\nnit: The different indent looks a bit ugly? Could use a fixed-size doxygen comment?"
  },
  {
   "t": "2026-08-20T14:55:45Z",
   "kind": "force_push",
   "who": "fanquake",
   "commit": "2227656a81b53caf2a21ccc1a1334b660e9986f1"
  },
  {
   "t": "2026-08-20T14:55:49Z",
   "kind": "review_comment",
   "who": "fanquake",
   "assoc": "MEMBER",
   "path": "src/util/syserror.h",
   "commit": "1ce27d26ea1e20fbf3632b13a28b15c057e7275d",
   "in_reply_to": 3822577492,
   "text": "Sure, changed."
  },
  {
   "t": "2026-08-21T12:41:10Z",
   "kind": "force_push",
   "who": "fanquake",
   "commit": "4b251dcd9764f1f56c6c49f5eaa3acf6f89e61f1"
  },
  {
   "t": "2026-09-09T08:45:48Z",
   "kind": "force_push",
   "who": "fanquake",
   "commit": "f04da080f895c0ef807da9b39c76083698946255"
  },
  {
   "t": "2026-09-11T10:02:21Z",
   "kind": "force_push",
   "who": "fanquake",
   "commit": "011fcdceac78ca66b47d181e7375c8711cd7eee1"
  },
  {
   "t": "2026-09-16T09:55:09Z",
   "kind": "force_push",
   "who": "fanquake",
   "commit": "6f6db82589839ccf42d8c04711ed4666a4c740f9"
  }
 ],
 "labels_log": [
  {
   "t": "2026-08-20T14:27:14Z",
   "action": "labeled",
   "label": "Utils/log/libs",
   "who": "DrahtBot"
  },
  {
   "t": "2026-08-20T14:36:31Z",
   "action": "labeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2026-08-20T16:26:05Z",
   "action": "unlabeled",
   "label": "CI failed",
   "who": "DrahtBot"
  }
 ],
 "state_log": [],
 "text_chars": 898,
 "text_tokens_estimate": 224,
 "changed_paths": [
  "cmake/bitcoin-build-config.h.in",
  "cmake/introspection.cmake",
  "src/util/fs.cpp",
  "src/util/fs_helpers.cpp",
  "src/util/sock.cpp",
  "src/util/syserror.cpp",
  "src/util/syserror.h",
  "test/lint/lint-locale-dependence.py"
 ],
 "files": [
  {
   "path": "cmake/bitcoin-build-config.h.in",
   "add": 0,
   "del": 3
  },
  {
   "path": "cmake/introspection.cmake",
   "add": 0,
   "del": 12
  },
  {
   "path": "src/util/fs.cpp",
   "add": 1,
   "del": 1
  },
  {
   "path": "src/util/fs_helpers.cpp",
   "add": 1,
   "del": 1
  },
  {
   "path": "src/util/sock.cpp",
   "add": 1,
   "del": 1
  },
  {
   "path": "src/util/syserror.cpp",
   "add": 2,
   "del": 40
  },
  {
   "path": "src/util/syserror.h",
   "add": 2,
   "del": 8
  },
  {
   "path": "test/lint/lint-locale-dependence.py",
   "add": 0,
   "del": 1
  }
 ],
 "test_lines": 1,
 "git": {
  "head": "6f6db82589839ccf42d8c04711ed4666a4c740f9",
  "head_matches_backup": true,
  "base": "7dedc4545a495ab6725a2a36cec2b6a1a9bf8dbf",
  "commits": [
   {
    "sha": "63bc501a0c",
    "subject": "util: remove usage of strerror_s/r",
    "files": 5,
    "add": 4,
    "del": 41
   },
   {
    "sha": "6f6db82589",
    "subject": "util: collapse Win32ErrorString into SysErrorString",
    "files": 5,
    "add": 3,
    "del": 26
   }
  ],
  "patch_truncated": false
 },
 "input_hash": "c782c397fb5c794f",
 "extracted_at": "2026-09-17T16:15:31+00:00"
}