From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Julien BOIBESSOT <julien.boibessot@armadeus.com>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/1] package/libmodbus: bump version to 3.2.0
Date: Sat, 3 Oct 2026 18:34:05 +0200 [thread overview]
Message-ID: <asEuRjLlq-Q4OvT8@windsurf> (raw)
In-Reply-To: <20260907213335.3492307-1-julien.boibessot@armadeus.com>
On Mon, Sep 07, 2026 at 11:33:35PM +0200, Julien BOIBESSOT wrote:
> diff --git a/package/libmodbus/0001-src-modbus-rtu-include-asm-ioctls.h-for-termios2-s.patch b/package/libmodbus/0001-src-modbus-rtu-include-asm-ioctls.h-for-termios2-s.patch
> new file mode 100644
> index 0000000000..21b4ecebbd
> --- /dev/null
> +++ b/package/libmodbus/0001-src-modbus-rtu-include-asm-ioctls.h-for-termios2-s.patch
> @@ -0,0 +1,40 @@
> +From 5f6af9e0e3d6adebc103a1f5a45a5b0d9c5a7e11 Mon Sep 17 00:00:00 2001
> +From: Julien BOIBESSOT <julien.boibessot@armadeus.com>
> +Date: Mon, 07 Sep 2026 18:54:00 +0200
> +Subject: [PATCH] src/modbus-rtu: include <asm/ioctls.h> for termios2 support
> +
> +Since v3.2.0, libmodbus uses the Linux termios2 interface (TCGETS2,
> +TCSETS2) to support custom baud rates. The configure check detects
> +"struct termios2" via <asm/termbits.h>, but the TCGETS2/TCSETS2 ioctl
> +constants are defined in <asm/ioctls.h>, which is not included by musl
> +libc through <sys/ioctl.h>.
> +
> +This breaks the build on musl-based systems:
> +
> + modbus-rtu.c: error: 'TCGETS2' undeclared (first use in this function)
> + modbus-rtu.c: error: 'TCSETS2' undeclared (first use in this function)
> +
> +Include <asm/ioctls.h> alongside <sys/ioctl.h> when HAVE_STRUCT_TERMIOS2
> +is defined to expose the TC*2 ioctl constants on all Linux libc.
> +
> +Upstream: not yet
Thanks a lot, but we need patches to be submitted before they can be
accepted in Buildroot.
I'm not 100% sure including <asm/ioctls.h> is the right solution, but
I honestly don't know. These TC* ioctl() are a bit of a mess :/
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2026-10-03 16:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-07 21:33 [Buildroot] [PATCH 1/1] package/libmodbus: bump version to 3.2.0 Julien BOIBESSOT
2026-09-30 11:55 ` Yegor Yefremov via buildroot
2026-10-03 16:34 ` Thomas Petazzoni via buildroot [this message]
2026-10-06 21:39 ` Yegor Yefremov via buildroot
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=asEuRjLlq-Q4OvT8@windsurf \
--to=buildroot@buildroot.org \
--cc=julien.boibessot@armadeus.com \
--cc=thomas.petazzoni@bootlin.com \
/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