)]}'
{
  "commit": "3294ce1893620aecf0d2a693c7177a0f84129422",
  "tree": "49b42f26d8b327fc57fba9fdf8f0ea0ae4e5a899",
  "parents": [
    "7c760cbceaf6c5da1cfb4ee6019c6fecf0008d1a"
  ],
  "author": {
    "name": "Michael Tokarev",
    "email": "mjt@tls.msk.ru",
    "time": "Sat Jun 02 23:43:33 2012 +0400"
  },
  "committer": {
    "name": "Blue Swirl",
    "email": "blauwirbel@gmail.com",
    "time": "Sat Jun 09 10:30:08 2012 +0000"
  },
  "message": "do not include \u003clibutil.h\u003e needlessly or if it doesn\u0027t exist\n\n\u003clibutil.h\u003e and \u003cutil.h\u003e on *BSD (some have one, some another)\nwere #included just for openpty() declaration.  The only file\nwhere this function is actually used is qemu-char.c.\n\nIn vl.c and net/tap-bsd.c, none of functions declared in libutil.h\n(login logout logwtmp timdomain openpty forkpty uu_lock realhostname\nfparseln and a few others depending on version) are used.\n\nInitially the code which is currently in qemu-char.c was in vl.c,\nit has been removed into separate file in commit 0e82f34d077dc2542\nFri Oct 31 18:44:40 2008, but the #includes were left in vl.c.\nSo with vl.c, we just remove includes - libutil.h, util.h and\npty.h (which declares only openpty() and forkpty()) from there.\n\nThe code in net/tap-bsd.c, which come from net/tap.c, had this\n\ncommit 5281d757efa6e40d74ce124be048b08d43887555\nAuthor: Mark McLoughlin \u003cmarkmc@redhat.com\u003e\nDate:   Thu Oct 22 17:49:07 2009 +0100\n\n    net: split all the tap code out into net/tap.c\n\nNote this commit not only moved stuff out of net.c to net/tap.c,\nbut also rewrote large portions of the tap code, and added these\ncompletely unnecessary #includes -- as usual, I question why such\na misleading commit messages are allowed.\n\nAgain, no functions defined in libutil.h or util.h on *BSD are\nused by neither net/tap.c nor net/tap-bsd.c.  Removing them.\n\nAnd finally, the only real user for these #includes, qemu-char.c,\nwhich actually uses openpty().  There, the #ifdef logic is wrong.\nA GLIBC-based system has \u003cpty.h\u003e, even if it is a variant of *BSD.\nSo __GLIBC__ should be checked first, and instead of trying to\ninclude \u003clibutil.h\u003e or \u003cutil.h\u003e, we include \u003cpty.h\u003e.  If it is not\nGLIBC-based, we check for variations between \u003c*util.h\u003e as before.\n\nThis patch fixes build of qemu 1.1 on Debian/kFreebsd (well, one\nof the two problems): it is a distribution with a FreeBSD kernel,\nso it #defines at least __FreeBSD_kernel__, but since it is based\non GLIBC, it has \u003cpty.h\u003e, but current version does not have neither\n\u003cutil.h\u003e nor \u003clibutil.h\u003e, which the code tries to include 3 times\nbut uses only once.\n\nSigned-off-By: Michael Tokarev \u003cmjt@tls.msk.ru\u003e\nCc: Aurelien Jarno \u003caurelien@aurel32.net\u003e\n\nSigned-off-by: Blue Swirl \u003cblauwirbel@gmail.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "4b6b3a41a095de3e035ef85a9c5a911d4af6df6b",
      "old_mode": 33188,
      "old_path": "net/tap-bsd.c",
      "new_id": "937a94b11f41e9f2f182bb41f80a7b11127b73ed",
      "new_mode": 33188,
      "new_path": "net/tap-bsd.c"
    },
    {
      "type": "modify",
      "old_id": "0bd903f58c0e27616c6ad5562925e6b942070f3b",
      "old_mode": 33188,
      "old_path": "qemu-char.c",
      "new_id": "c2aaaeeb8f6dfb3a38fc868b29c6eada015d7a3a",
      "new_mode": 33188,
      "new_path": "qemu-char.c"
    },
    {
      "type": "modify",
      "old_id": "148542617dab9203f71db0cb2349e8a4ca91bb7d",
      "old_mode": 33188,
      "old_path": "vl.c",
      "new_id": "204d85bcf6c8dc89cf9d4eef8d26789f149fab08",
      "new_mode": 33188,
      "new_path": "vl.c"
    }
  ]
}
