Actions
Bug #9021
opensys/loadavg.h is not self-contained
Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Start date:
2018-02-03
Due date:
% Done:
0%
Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:
Description
In OpenIndiana hipster, the include file <sys/loadavg.h> is not self-contained.
How to reproduce:
==================== foo.c ================= #include <sys/loadavg.h> ========================================= $ gcc -c foo.c In file included from foo.c:1:0: /usr/include/sys/loadavg.h:47:2: error: unknown type name 'hrtime_t' hrtime_t lg_total; /* used to temporarily hold load totals */ ^~~~~~~~ /usr/include/sys/loadavg.h:48:2: error: unknown type name 'hrtime_t' hrtime_t lg_loads[S_LOADAVG_SZ]; /* table of recorded entries */ ^~~~~~~~
Note: This is a regression compared to Oracle Solaris: In Solaris 11.3, this works fine.
Related issues
Updated by Bruno Haible over 4 years ago
The fix is probably to add a
#include <sys/time.h>
statement near the top of /usr/include/sys/loadavg.h.
Updated by Alexander Pyhalov over 4 years ago
- Project changed from OpenIndiana Distribution to illumos gate
Updated by Yuri Pankov over 4 years ago
- Description updated (diff)
Indeed it's a regression introduced in #5100, I don't see why that struct has to be in the header at all.
Updated by Yuri Pankov over 4 years ago
- Related to Bug #5100: sparc build failed after 5004 added
Actions