From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server-vie001.gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_DBL_BLOCKED_OPENDNS, URIBL_ZEN_BLOCKED_OPENDNS autolearn=ham autolearn_force=no version=3.4.6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=new2025; t=1754000282; bh=bk3viSCVcgtJX9QPHcUo3LKQ+NvL+Q9Z3yZCfMCps0A=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Transfer-Encoding:In-Reply-To:Message-ID:Date: From:Reply-To:Subject:To:Cc:In-Reply-To:References:Resent-Date: Resent-From:Resent-To:Resent-Cc:User-Agent:Content-Type: Content-Transfer-Encoding; b=nZbQh4FD8mita3qHv2NSf6iZ+YWAf3az3+8qVag6xNt6L9KsSjIXHSGxI4ieRi668 s/dlYNqGiwNiRZqKZWl0N7ygXnRfCWsaUfqoYaQX4VcOeweFYzQ+A56G6Ngpc9ZRWM z/pKYOKZUWQCTpK2+jx8kk6+y8aIMGW68AXqOlSYVNiGVx1hztQtG99cVdXt2n1UkD aKBnjjaKB7SLa/8bAWkk5ZEgZNmpV00jR15OPe1faI5dMt5O+sNjCiEFGPT3gYIs4D st6AVKlocKhgaf3FPUUj7qwTTW5rPcdarZojExnWgsZrybngVrrhwaKusLehNlsD0/ ZG7marg1nkBaw== Received: from linux.gnuweeb.org (unknown [182.253.126.229]) by server-vie001.gnuweeb.org (Postfix) with ESMTPSA id 27FA53126ED4; Thu, 31 Jul 2025 22:18:01 +0000 (UTC) Date: Fri, 1 Aug 2025 05:17:58 +0700 From: Ammar Faizi To: Alviro Iskandar Setiawan Cc: GNU/Weeb Mailing List Subject: Re: [PATCH gwproxy v1 1/2] log: Fix missing `gettid()` syscall on older glibc version Message-ID: References: <20250731220546.303497-1-alviro.iskandar@gnuweeb.org> <20250731220546.303497-2-alviro.iskandar@gnuweeb.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20250731220546.303497-2-alviro.iskandar@gnuweeb.org> X-Machine-Hash: hUx9VaHkTWcLO7S8CQCslj6OzqBx2hfLChRz45nPESx5VSB/xuJQVOKOB1zSXE3yc9ntP27bV1M1 List-Id: On Fri, Aug 01, 2025 at 05:05:45AM +0700, Alviro Iskandar Setiawan wrote: > diff --git a/src/gwproxy/log.c b/src/gwproxy/log.c > index 95d1930..574c5e0 100644 > --- a/src/gwproxy/log.c > +++ b/src/gwproxy/log.c > @@ -1,5 +1,6 @@ > #include > #include > +#include > #include > #include > #include > @@ -7,6 +8,11 @@ > #include > #include > > +static inline pid_t __sys_gettid(void) > +{ > + return (pid_t)__do_syscall0(__NR_gettid); > +} You can't use __do_syscall0() macro because it's only defined on x86-64. This breaks powerpc64 build and other architectures: src/gwproxy/log.c: In function ‘__sys_gettid’: src/gwproxy/log.c:13:23: warning: implicit declaration of function ‘__do_syscall0’ [-Wimplicit-function-declaration] 13 | return (pid_t)__do_syscall0(__NR_gettid); | ^~~~~~~~~~~~~ -- Ammar Faizi