From: Ammar Faizi <ammarfaizi2@gnuweeb.org>
To: Alviro Iskandar Setiawan <alviro.iskandar@gnuweeb.org>
Cc: GNU/Weeb Mailing List <gwml@vger.gnuweeb.org>
Subject: Re: [PATCH gwproxy v1 1/2] log: Fix missing `gettid()` syscall on older glibc version
Date: Fri, 1 Aug 2025 05:17:58 +0700 [thread overview]
Message-ID: <aIvrlj18CXH7aHq2@linux.gnuweeb.org> (raw)
In-Reply-To: <20250731220546.303497-2-alviro.iskandar@gnuweeb.org>
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 <gwproxy/common.h>
> #include <gwproxy/log.h>
> +#include <gwproxy/syscall.h>
> #include <time.h>
> #include <stdlib.h>
> #include <stdio.h>
> @@ -7,6 +8,11 @@
> #include <unistd.h>
> #include <stdarg.h>
>
> +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
next prev parent reply other threads:[~2025-07-31 22:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-31 22:05 [PATCH gwproxy v1 0/2] Fixes for older glibc version Alviro Iskandar Setiawan
2025-07-31 22:05 ` [PATCH gwproxy v1 1/2] log: Fix missing `gettid()` syscall on " Alviro Iskandar Setiawan
2025-07-31 22:17 ` Ammar Faizi [this message]
2025-07-31 22:20 ` Alviro Iskandar Setiawan
2025-07-31 22:05 ` [PATCH gwproxy v1 2/2] configure: Append `-lanl` lib to fix missing `getaddrinfo_a()` Alviro Iskandar Setiawan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aIvrlj18CXH7aHq2@linux.gnuweeb.org \
--to=ammarfaizi2@gnuweeb.org \
--cc=alviro.iskandar@gnuweeb.org \
--cc=gwml@vger.gnuweeb.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox