Browse Source

[core] Solaris has getloadavg in sys/loadavg.h

SunOS/Solaris/Illumos has getloadavg declared in sys/loadavg.h .

github: closes #101
personal/stbuehler/ci-build
Niclas Rosenvik 2 years ago
committed by Glenn Strauss
parent
commit
8c9b5480f3
  1. 1
      SConstruct
  2. 1
      configure.ac
  3. 1
      src/CMakeLists.txt
  4. 1
      src/config.h.cmake
  5. 1
      src/meson.build
  6. 4
      src/server.c

1
SConstruct

@ -360,6 +360,7 @@ if 1:
'sys/devpoll.h',
'sys/epoll.h',
'sys/filio.h',
'sys/loadavg.h',
'sys/poll.h',
'sys/port.h',
'sys/prctl.h',

1
configure.ac

@ -112,6 +112,7 @@ AC_CHECK_HEADERS([\
sys/epoll.h \
sys/event.h \
sys/filio.h \
sys/loadavg.h \
sys/mman.h \
sys/poll.h \
sys/prctl.h \

1
src/CMakeLists.txt

@ -86,6 +86,7 @@ set(CMAKE_REQUIRED_FLAGS "-include sys/types.h")
check_include_files(sys/event.h HAVE_SYS_EVENT_H)
set(CMAKE_REQUIRED_FLAGS)
check_include_files(sys/mman.h HAVE_SYS_MMAN_H)
check_include_files(sys/loadavg.h HAVE_SYS_LOADAVG_H)
check_include_files(sys/poll.h HAVE_SYS_POLL_H)
check_include_files(sys/port.h HAVE_SYS_PORT_H)
check_include_files(sys/prctl.h HAVE_SYS_PRCTL_H)

1
src/config.h.cmake

@ -16,6 +16,7 @@
#cmakedefine HAVE_SYS_DEVPOLL_H
#cmakedefine HAVE_SYS_EPOLL_H
#cmakedefine HAVE_SYS_EVENT_H
#cmakedefine HAVE_SYS_LOADAVG_H
#cmakedefine HAVE_SYS_MMAN_H
#cmakedefine HAVE_SYS_POLL_H
#cmakedefine HAVE_SYS_PORT_H

1
src/meson.build

@ -29,6 +29,7 @@ conf_data = configuration_data()
conf_data.set('HAVE_SYS_DEVPOLL_H', compiler.has_header('sys/devpoll.h'))
conf_data.set('HAVE_SYS_EPOLL_H', compiler.has_header('sys/epoll.h'))
conf_data.set('HAVE_SYS_EVENT_H', compiler.has_header('sys/event.h'))
conf_data.set('HAVE_SYS_LOADAVG_H', compiler.has_header('sys/loadavg.h'))
conf_data.set('HAVE_SYS_MMAN_H', compiler.has_header('sys/mman.h'))
conf_data.set('HAVE_SYS_POLL_H', compiler.has_header('sys/poll.h'))
conf_data.set('HAVE_SYS_PORT_H', compiler.has_header('sys/port.h'))

4
src/server.c

@ -63,6 +63,10 @@
# include <syslog.h>
#endif
#ifdef HAVE_SYS_LOADAVG_H
# include <sys/loadavg.h>
#endif
#ifdef HAVE_SYS_RESOURCE_H
# include <sys/resource.h>
#endif

Loading…
Cancel
Save