]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Solaris: include <sys/lgrp_user_impl.h> only on newer Solaris.
authorIvo Raisr <ivosh@ivosh.net>
Wed, 15 Feb 2017 15:22:05 +0000 (15:22 +0000)
committerIvo Raisr <ivosh@ivosh.net>
Wed, 15 Feb 2017 15:22:05 +0000 (15:22 +0000)
Follow up to SVN r16224 and r16225, BZ#376455.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16226

configure.ac
include/vki/vki-solaris.h
memcheck/tests/solaris/scalar.c

index 913d289c7d8721ab39af95746bac1ebbb8dc1c97..587917ba4d0cd3fd2b4f484b8d5f81f6f2eb7f76 100644 (file)
@@ -2757,6 +2757,8 @@ fi
 #----------------------------------------------------------------------------
 
 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.
index f464ef211bdf9e021efc533a079ef35272f9511d..15f71cde1175f8faca611a06adc8d52163624369 100644 (file)
@@ -605,10 +605,10 @@ typedef struct vki_kcf_door_arg_s {
 
 
 #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
@@ -621,6 +621,7 @@ typedef struct vki_kcf_door_arg_s {
 #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>
index 606bc51b36c3f3eeb413cf91438f34177b92f8ec..fef2d6994b9b2658728108d290ee470983aafb63 100644 (file)
@@ -1,6 +1,7 @@
 /* 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>
@@ -9,7 +10,10 @@
 #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>