Valgrind: r16226 - in /trunk: configure.ac include/vki/vki-solaris.h memcheck/tests/solaris/scalar.c

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Valgrind: r16226 - in /trunk: configure.ac include/vki/vki-solaris.h memcheck/tests/solaris/scalar.c

svn-2
Author: iraisr
Date: Wed Feb 15 15:22:05 2017
New Revision: 16226

Log:
Solaris: include <sys/lgrp_user_impl.h> only on newer Solaris.
Follow up to SVN r16224 and r16225, BZ#376455.

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

Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Wed Feb 15 15:22:05 2017
@@ -2757,6 +2757,8 @@
 #----------------------------------------------------------------------------
 
 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.

Modified: trunk/include/vki/vki-solaris.h
==============================================================================
--- trunk/include/vki/vki-solaris.h (original)
+++ trunk/include/vki/vki-solaris.h Wed Feb 15 15:22:05 2017
@@ -605,10 +605,10 @@
 
 
 #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 @@
 #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>

Modified: trunk/memcheck/tests/solaris/scalar.c
==============================================================================
--- trunk/memcheck/tests/solaris/scalar.c (original)
+++ trunk/memcheck/tests/solaris/scalar.c Wed Feb 15 15:22:05 2017
@@ -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>


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Valgrind-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/valgrind-developers
Loading...