https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114065

--- Comment #75 from Nicolas Boulenguez <nicolas at debian dot org> ---
This?

s-oscons-tmpl.c
 struct timeval tv;
 #define SIZEOF_tv_sec (sizeof(tv.tv_sec))
-#define SIZEOF_tv_usec (sizeof(tv.tv_usec))
+#define SIZEOF_tv_usec (sizeof(tv) - SIZEOF_tv_sec)
 struct timespec ts;
-#define SIZEOF_tv_nsec (sizeof(ts.tv_nsec))
+#define SIZEOF_tv_nsec (sizeof(ts) - SIZEOF_tv_sec)

s-c_time.ads (unchanged): 
 type time_t is ... with Size => SIZEOF_tv_sec;
 type usec_t is ... with Size => SIZEOF_tv_usec;
 type nsec_t is ... with Size => SIZEOF_tv_nsec;
 type timeval is record
    tv_sec  : time_t;
    tv_usec : usec t;
 end record with Convention => C;
 type timespec is record
    tv_sec  : time_t;
    tv_nsec : nsec t;
 end record with Convention => C;

Reply via email to