Hello,
Stefan Berger, le mar. 10 févr. 2026 12:58:24 -0500, a ecrit:
> On 2/7/26 11:03 PM, Damien Zammit wrote:
> > On 2/4/26 2:21 AM, Stefan Berger wrote:
> > > enum {
> > > PTM_GET_CAPABILITY = _IOR('P', 0, ptm_cap),
> > > PTM_INIT = _IOWR('P', 1, ptm_init),
> > > PTM_SHUTDOWN = _IOR('P', 2, ptm_res),
> >
> > No, this wont work because the _IOT__IOTBASE_* symbols are missing for
> > the tpm structs on GNU platform:
>
> >
> > In file included from /usr/include/x86_64-gnu/sys/ioctl.h:26,
> > from ../backends/tpm/tpm_ioctl.h:17,
> > from ../backends/tpm/tpm_emulator.c:39:
> > ../backends/tpm/tpm_ioctl.h:290:30: error: ‘_IOT__IOTBASE_ptm_cap’
> > undeclared here (not in a function)
> > 290 | PTM_GET_CAPABILITY = _IOR('P', 0, ptm_cap),
> > | ^~~~
>
> I have it compile because I added this here (above):
>
> #ifdef __gnu_hurd__
> #include <mach/x86_64/ioccom.h>
> #endif
This mach-ish ioccom.h is not the way ioctls are defined in the Hurd. I
have actually even dropped it from gnumach, since we don't actually use
this way of defining ioctls any more. _IOT macros for ptm_capt/init/res
really need to be defined for _IOR/WR to be usable.
Samuel