Hi,

I did the following things in a Debian/Hurd virtual machine.

I was following this link <https://darnassus.sceen.net/~hurd-web/hurd/translator/writing/example/> to implement a rtc server. My idea is that I should implement a working rtc server in user space before adding the source code into the repo because I don't want to get stuck in Makefile system before I have a working rtc server. I wrote the pioctl.defs (I paste it below), used mig to resolve it, and mig told me 'tm_t' is not defined. Then I added the following lines in /usr/include/i386-gnu/hurd/ioctl_types.h:

```
typedef struct srtentry srtentry_t;

+#include <bits/types/struct_tm.h>
+typedef struct tm tm_t;
#endif  /* hurd/ioctl_types.h */
```

It still didn't work. How can I use `struct tm` in a user space defs file?

Thank you

pioctl.defs:
```
/* Ioctl group 'p'; the subsystem is derived from calculations in
    hurd/ioctls.defs. */
subsystem pioctl 140000;

#include <hurd/ioctl_types.defs>

#ifdef PIOCTL_IMPORTS
PIOCTL_IMPORTS
#endif

INTR_INTERFACE

/* TODO: adding other ioctl calls for /dev/rtc in mc146818rtc.h */
skip; skip; skip; skip; /* 0 1 2 3 */
skip; skip; skip; skip; /* 4 5 6 7 */
skip;                   /* 8 */

/* 9 RTC_RD_TIME */
routine pioctl_rtc_rd_time (
    reqport: io_t;
    inout time: tm_t);

/* 10 RTC_SET_TIME */
routine pioctl_rtc_set_time (
    reqport: io_t;
    time: tm_t);
```

--
Zhaoming Luo <zhaoming1...@qq.com>



Reply via email to