#----------------------------------------------------------------------------
if test "$VGCONF_OS" = "solaris" ; then
+AC_CHECK_HEADERS([sys/lgrp_user_impl.h])
+
# Solaris-specific check determining if the Sun Studio Assembler is used to
# build Valgrind. The test checks if the x86/amd64 assembler understands the
# cmovl.l instruction, if yes then it's Sun Assembler.
#include <sys/lgrp_user.h>
-#define vki_lgrp_view_t lgrp_view_t
-
-
+#if defined(HAVE_SYS_LGRP_USER_IMPL_H)
+/* Include implementation specific header file on newer Solaris. */
#include <sys/lgrp_user_impl.h>
+#endif /* HAVE_SYS_LGRP_USER_IMPL_H */
#define VKI_LGRP_SYS_MEMINFO LGRP_SYS_MEMINFO
#define VKI_LGRP_SYS_GENERATION LGRP_SYS_GENERATION
#define VKI_LGRP_SYS_VERSION LGRP_SYS_VERSION
#define VKI_LGRP_SYS_AFF_INHERIT_SET LGRP_SYS_AFF_INHERIT_SET
#define VKI_LGRP_SYS_DEVICE_LGRPS LGRP_SYS_DEVICE_LGRPS
#define VKI_LGRP_SYS_MAXSOCKETS_GET LGRP_SYS_MAXSOCKETS_GET
+#define vki_lgrp_view_t lgrp_view_t
#include <sys/loadavg.h>
/* Basic syscall test, see memcheck/tests/x86-linux/scalar.c for more info. */
#include "scalar.h"
+#include "config.h"
#include <bsm/audit.h>
#include <nfs/nfs.h>
#include <sys/door.h>
#include <sys/fcntl.h>
#include <sys/fstyp.h>
+#include <sys/lgrp_user.h>
+#if defined(HAVE_SYS_LGRP_USER_IMPL_H)
#include <sys/lgrp_user_impl.h>
+#endif /* HAVE_SYS_LGRP_USER_IMPL_H */
#include <sys/mman.h>
#include <sys/modctl.h>
#include <sys/mount.h>