get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/2194433/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2194433,
    "url": "http://patchwork.ozlabs.org/api/patches/2194433/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uclibc-ng/patch/20260208233645.2d976b5d@qbrowse/",
    "project": {
        "id": 55,
        "url": "http://patchwork.ozlabs.org/api/projects/55/?format=api",
        "name": "uClibc NG development",
        "link_name": "uclibc-ng",
        "list_id": "devel.uclibc-ng.org",
        "list_email": "devel@uclibc-ng.org",
        "web_url": "http://www.uclibc-ng.org",
        "scm_url": "",
        "webscm_url": "http://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260208233645.2d976b5d@qbrowse>",
    "list_archive_url": null,
    "date": "2026-02-08T22:36:45",
    "name": "[uclibc-ng-devel] Fix adjtimex() with TIME64",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "d97a816db2bace791fdc35d86a08309474bf60ae",
    "submitter": {
        "id": 92605,
        "url": "http://patchwork.ozlabs.org/api/people/92605/?format=api",
        "name": "Joris van Rantwijk",
        "email": "joris@jorisvr.nl"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/uclibc-ng/patch/20260208233645.2d976b5d@qbrowse/mbox/",
    "series": [
        {
            "id": 491446,
            "url": "http://patchwork.ozlabs.org/api/series/491446/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/uclibc-ng/list/?series=491446",
            "date": "2026-02-08T22:36:45",
            "name": "[uclibc-ng-devel] Fix adjtimex() with TIME64",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/491446/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2194433/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2194433/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<devel-bounces@uclibc-ng.org>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n secure) header.d=jorisvr.nl header.i=@jorisvr.nl header.a=rsa-sha256\n header.s=soverin1 header.b=BFTUyUCJ;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=uclibc-ng.org\n (client-ip=89.238.66.15; helo=helium.openadk.org;\n envelope-from=devel-bounces@uclibc-ng.org; receiver=patchwork.ozlabs.org)",
            "helium.openadk.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n secure) header.d=jorisvr.nl header.i=@jorisvr.nl header.a=rsa-sha256\n header.s=soverin1 header.b=BFTUyUCJ;\n\tdkim-atps=neutral",
            "smtp.freedom.nl;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=jorisvr.nl header.i=@jorisvr.nl header.a=rsa-sha256\n header.s=soverin1 header.b=BFTUyUCJ;\n\tdkim-atps=neutral"
        ],
        "X-Greylist": "delayed 309 seconds by postgrey-1.37 at legolas;\n Mon, 09 Feb 2026 09:42:30 AEDT",
        "Received": [
            "from helium.openadk.org (helium.openadk.org [89.238.66.15])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4f8NBG3jv8z1xvc\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 09 Feb 2026 09:42:30 +1100 (AEDT)",
            "from helium.openadk.org (localhost [127.0.0.1])\n\tby helium.openadk.org (Postfix) with ESMTP id A418631E0C56;\n\tSun, 08 Feb 2026 23:37:08 +0100 (CET)",
            "from outbound.soverin.net (outbound.soverin.net [185.233.34.18])\n\tby helium.openadk.org (Postfix) with ESMTPS id EEE0B31E0437\n\tfor <devel@uclibc-ng.org>; Sun, 08 Feb 2026 23:36:47 +0100 (CET)",
            "from smtp.freedom.nl (unknown [10.10.4.108])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature RSA-PSS (4096 bits))\n\t(No client certificate requested)\n\tby outbound.soverin.net (Postfix) with ESMTPS id 4f8N3g4gP4zwg\n\tfor <devel@uclibc-ng.org>; Sun,  8 Feb 2026 22:36:47 +0000 (UTC)",
            "from smtp.freedom.nl (smtp.freedom.nl [10.10.4.108]) by freedom.nl\n (Postfix) with ESMTPSA id 4f8N3g1w6nz2xKd\n\tfor <devel@uclibc-ng.org>; Sun,  8 Feb 2026 22:36:47 +0000 (UTC)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=jorisvr.nl;\n s=soverin1;\n\tt=1770590207;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\t to:to:cc:mime-version:mime-version:content-type:content-type:\n\t content-transfer-encoding:content-transfer-encoding;\n\tbh=Fk/+LEub24uA/XmbLFnq2/I9m4U8x9eHI6N+SxDVOk0=;\n\tb=BFTUyUCJzG+WgIqiWVOEL18qDJxqId030zIAQ2WZSCNWBJyrmGQfGFBcoUd/OZxm8GVdv7\n\tJoR78+LAiU4PnQ3w2mRy3gY70NtpfdPDi6QrLwBqF8PSNyTRa+rMQPQJWRdayxNBxJMw0T\n\txKVTpRF24DNg77A7eBu1J/u3kKlwjLErGImvz7a3PN6bdn64Ukj/6cuvVxFOjUAgME6F1G\n\tTc2hHokjW1XRsUNIM4pdQ6x5O2YwyPmi8I7swrT8Bl7Gi0xR/X95O228dw2lWaQW2sZg0y\n\tP1rki0ZgG7/aCV45mvPy7xH9BhrIqpmOr+ezTBa+yO/szyjgDG8vwp4CEufdbQ==",
        "X-CMAE-Score": "0",
        "X-CM-Analysis": "v=2.4 cv=UsCZN/wB c=1 sm=1 tr=0 ts=69890fff\n a=doeMwe0XaHiC9y3Ue1WqAQ==:117 a=doeMwe0XaHiC9y3Ue1WqAQ==:17\n a=kj9zAlcOel0A:10 a=yIIaa-aeAAAA:8 a=2NG7GMGYJVhUv8ntApsA:9 a=CjuIK1q_8ugA:10\n a=U95Z9zqJ5kCyPj06KpVe:22",
        "X-CM-Envelope": "\n MS4xfFAcqCdR46oQkecwz62p9fzkjSshoR9t6qXawwqa5H+A+zphdGAd7erbhSYtGCX68XrVXdfYyKAGe33+80UqgtoyI1hgm67mXtRcuB3rwHPoMSy9efrB\n DjtPHy9u205pM9SyZ1yTP9Uf8PW0aZNh/Acwstwl3nyF8lFTXS9SlUcU",
        "X-Soverin-Id": "019c3f66-7c18-7c11-bcb6-0ab6e60f82b1",
        "Date": "Sun, 8 Feb 2026 23:36:45 +0100",
        "From": "Joris van Rantwijk <joris@jorisvr.nl>",
        "To": "devel@uclibc-ng.org",
        "Message-ID": "<20260208233645.2d976b5d@qbrowse>",
        "MIME-Version": "1.0",
        "X-Spampanel-Class": "ham",
        "X-Spam-Status": "no",
        "Message-ID-Hash": "2V7BHSLEQKXHHPFTDJWAS3J7XN4KHAYY",
        "X-Message-ID-Hash": "2V7BHSLEQKXHHPFTDJWAS3J7XN4KHAYY",
        "X-MailFrom": "joris@jorisvr.nl",
        "X-Mailman-Rule-Misses": "dmarc-mitigation; no-senders; approved; loop;\n banned-address; emergency; member-moderation; nonmember-moderation;\n administrivia; implicit-dest; max-recipients; max-size; news-moderation;\n no-subject; digests; suspicious-header",
        "X-Mailman-Version": "3.3.10",
        "Precedence": "list",
        "Subject": "[uclibc-ng-devel] [PATCH] Fix adjtimex() with TIME64",
        "List-Id": "uClibc-ng Development <devel.uclibc-ng.org>",
        "Archived-At": "\n <https://uclibc-ng.org/mailman3/hyperkitty/list/devel@uclibc-ng.org/message/2V7BHSLEQKXHHPFTDJWAS3J7XN4KHAYY/>",
        "List-Archive": "\n <https://uclibc-ng.org/mailman3/hyperkitty/list/devel@uclibc-ng.org/>",
        "List-Help": "<mailto:devel-request@uclibc-ng.org?subject=help>",
        "List-Owner": "<mailto:devel-owner@uclibc-ng.org>",
        "List-Post": "<mailto:devel@uclibc-ng.org>",
        "List-Subscribe": "<mailto:devel-join@uclibc-ng.org>",
        "List-Unsubscribe": "<mailto:devel-leave@uclibc-ng.org>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit"
    },
    "content": "When UCLIBC_USE_TIME64 is enabled on a 32-bit target, \"struct timex\"\ndoes not match the kernel definition of the struct. As a result,\nfunctions adjtimex() and clock_adjtime() misbehave. This causes failure\nof NTP clients such as Chrony.\n\nThis patch changes the definition of \"struct timex\" to match the 64-bit\nkernel definition when UCLIBC_USE_TIME64 is defined. This form of the\nstruct is suitable for syscall clock_adjtime64(). Otherwise, when TIME64\nis disabled, \"struct timex\" remains unchanged in the form suitable for\nsyscall clock_adjtime().\n\nNote that recent versions of glibc use a similar conditional definition\nof \"struct timex\".\n\nFurthermore, this patch implements adjtimex() by calling clock_adjtime().\nThis works because clock_adjtime() resolves to clock_adjtime64() when\nTIME64 is defined. Redirecting to clock_adjtime() is necessary because\nthere is no adjtimex64() syscall.\n\nAn early draft of this patch was proposed by Waldemar Brodkorb.\nI added the change in \"struct timex\" and tested that this works with and\nwithout TIME64.\n\nSigned-off-by: Joris van Rantwijk <joris@jorisvr.nl>\n---\n include/sys/timex.h                  | 34 ++++++++++++++++++++++++++++\n libc/sysdeps/linux/common/adjtimex.c |  7 +-----\n 2 files changed, 35 insertions(+), 6 deletions(-)",
    "diff": "diff --git a/include/sys/timex.h b/include/sys/timex.h\nindex 76fefa7ce..28ec19e18 100644\n--- a/include/sys/timex.h\n+++ b/include/sys/timex.h\n@@ -33,6 +33,39 @@ struct ntptimeval\n \n struct timex\n {\n+#ifdef __UCLIBC_USE_TIME64__\n+  unsigned int modes;\t/* mode selector */\n+  int :32;\n+  long long offset;\t/* time offset (usec) */\n+  long long freq;\t/* frequency offset (scaled ppm) */\n+  long long maxerror;\t/* maximum error (usec) */\n+  long long esterror;\t/* estimated error (usec) */\n+  int status;\t\t/* clock command/status */\n+  int :32;\n+  long long constant;\t/* pll time constant */\n+  long long precision;\t/* clock precision (usec) (read only) */\n+  long long tolerance;\t/* clock frequency tolerance (ppm) (read only) */\n+  struct timeval time;\t/* (read only) */\n+  long long tick;\t/* (modified) usecs between clock ticks */\n+  long long ppsfreq;\t/* pps frequency (scaled ppm) (ro) */\n+  long long jitter;\t/* pps jitter (us) (ro) */\n+  int shift;\t\t/* interval duration (s) (shift) (ro) */\n+  int :32;\n+  long long stabil;\t/* pps stability (scaled ppm) (ro) */\n+  long long jitcnt;\t/* jitter limit exceeded (ro) */\n+  long long calcnt;\t/* calibration intervals (ro) */\n+  long long errcnt;\t/* calibration errors (ro) */\n+  long long stbcnt;\t/* stability limit exceeded (ro) */\n+\n+  int tai;\t\t/* TAI offset (ro) */\n+\n+  /* ??? */\n+  int  :32; int  :32; int  :32; int  :32;\n+  int  :32; int  :32; int  :32; int  :32;\n+  int  :32; int  :32; int  :32;\n+\n+#else\n+\n   unsigned int modes;\t/* mode selector */\n   long int offset;\t/* time offset (usec) */\n   long int freq;\t/* frequency offset (scaled ppm) */\n@@ -59,6 +92,7 @@ struct timex\n   int  :32; int  :32; int  :32; int  :32;\n   int  :32; int  :32; int  :32; int  :32;\n   int  :32; int  :32; int  :32; int  :32;\n+#endif\n };\n \n /* Mode codes (timex.mode) */\ndiff --git a/libc/sysdeps/linux/common/adjtimex.c b/libc/sysdeps/linux/common/adjtimex.c\nindex 2fd7977f6..92c628296 100644\n--- a/libc/sysdeps/linux/common/adjtimex.c\n+++ b/libc/sysdeps/linux/common/adjtimex.c\n@@ -6,18 +6,13 @@\n  * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.\n  */\n \n-#include <sys/syscall.h>\n #include <sys/timex.h>\n-\n-#if defined(__NR_adjtimex)\n-_syscall1(int, adjtimex, struct timex *, buf)\n-#else\n #include <time.h>\n+\n int adjtimex(struct timex *buf)\n {\n     return clock_adjtime(CLOCK_REALTIME, buf);\n }\n-#endif\n \n libc_hidden_def(adjtimex)\n weak_alias(adjtimex,__adjtimex)\n",
    "prefixes": [
        "uclibc-ng-devel"
    ]
}