)]}'
{
  "commit": "2636da31af44fab38c22cee0fe771761173ea64b",
  "tree": "696361ea579d7977d1471a45e9066a454f88af49",
  "parents": [
    "78003763dade2829edb59746bd8451533699e13d"
  ],
  "author": {
    "name": "Simon Marchi",
    "email": "simon.marchi@efficios.com",
    "time": "Mon Nov 17 16:25:18 2025 -0500"
  },
  "committer": {
    "name": "Sam James",
    "email": "sam@gentoo.org",
    "time": "Tue Aug 25 04:36:59 2026 +0100"
  },
  "message": "gdb/ser-unix: work around conflicting types for tcflag_t\n\nWhen trying to cross-compile GDB to sparc-buildroot-linux-uclibc, I get:\n\n      CXX    ser-unix.o\n    In file included from /data1/smarchi/many-buildroots/toolchains/sparc/sparc-buildroot-linux-uclibc/sysroot/usr/include/termios.h:39,\n                     from /home/smarchi/src/binutils-gdb/gdb/ser-unix.c:51:\n    /data1/smarchi/many-buildroots/toolchains/sparc/sparc-buildroot-linux-uclibc/sysroot/usr/include/bits/termios.h:26:22: error: conflicting declaration ‘typedef unsigned int tcflag_t’\n       26 | typedef unsigned int tcflag_t;\n          |                      ^~~~~~~~\n    In file included from /home/smarchi/src/binutils-gdb/gdb/ser-unix.c:46:\n    /data1/smarchi/many-buildroots/toolchains/sparc/sparc-buildroot-linux-uclibc/sysroot/usr/include/asm/termbits.h:13:25: note: previous declaration as ‘typedef long unsigned int tcflag_t’\n       13 | typedef unsigned long   tcflag_t;\n          |                         ^~~~~~~~\n\nuClibc and the kernel don\u0027t agree on the definition of tcflag_t for this\narchitecture.  Here\u0027 uClibc [1]:\n\n    typedef unsigned int tcflag_t;\n\nAnd here\u0027s the kernel [2]:\n\n    #if defined(__sparc__) \u0026\u0026 defined(__arch64__)\n    typedef unsigned int\ttcflag_t;\n    #else\n    typedef unsigned long\ttcflag_t; \u003c--- that branch is take\n    #endif\n\nglibc [3] has the same definition as uClibc, so we would get the same\nproblem.\n\nI propose to work around this the same way as we handle differences in\nthe termios structure, by renaming the version from the kernel.\n\nI opened a bug on the glibc bugzilla [4] to ask if this is something\nthat would need to be fixed on the libc side, but in the mean time we\nneed to work around it.\n\n[1] https://github.com/kraj/uClibc/blob/ca1c74d67dd115d059a875150e10b8560a9c35a8/libc/sysdeps/linux/sparc/bits/termios.h#L26\n[2] https://github.com/torvalds/linux/blob/e7c375b181600caf135cfd03eadbc45eb530f2cb/arch/sparc/include/uapi/asm/termbits.h#L7-L11\n[3] https://gitlab.com/gnutools/glibc/-/blob/efc8642051e6c4fe5165e8986c1338ba2c180de6/bits/termios.h#L104\n[4] https://sourceware.org/bugzilla/show_bug.cgi?id\u003d33643\n\nChange-Id: I71c6e0df5ac8e2ff3db3233a2220faaf70c3df6d\nApproved-By: Tom Tromey \u003ctom@tromey.com\u003e\n(cherry picked from commit 6b84377e146794446f21371f8455b870a029cc8e)\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "5ec664df1f327d82410e5b33f8cd859cf13a1fa3",
      "old_mode": 33188,
      "old_path": "gdb/ser-unix.c",
      "new_id": "50c0fdddf6d8a0da604388c6cc65ea97578cbf36",
      "new_mode": 33188,
      "new_path": "gdb/ser-unix.c"
    }
  ]
}
