components/openscap/patches/zz_fixes_for_64bit.patch
author Jacob Varughese <jacob.varughese@oracle.com>
Thu, 17 Nov 2016 13:46:47 -0800
changeset 7343 a6cfc180f5e8
parent 5111 e68e059c3456
permissions -rw-r--r--
25077840 smfproperty probe needs to be fixed to handle nested property groups 25099101 oscap fails with core built with 64-bit

This patch is required to build 64-bit versions of openscap on solaris.
It has been submitted to upstream, parts of it were accepted, but the
remainder have not been accepted.

--- openscap-1.2.0/configure.ac.~3~	2014-08-08 10:58:39.160398757 -0700
+++ openscap-1.2.0/configure.ac	2014-08-08 10:58:15.703200526 -0700
@@ -877,7 +877,7 @@
 #check for atomic functions
 case $host_cpu in
 	i386 | i486 | i586 | i686)
-		CFLAGS="$CFLAGS  -march=i686"
+#		CFLAGS="$CFLAGS  -march=i686"
 		;;
 esac
 
--- openscap-1.2.0/src/OVAL/probes/SEAP/_sexp-value.h.~1~	2014-12-19 09:53:15.178129356 -0800
+++ openscap-1.2.0/src/OVAL/probes/SEAP/_sexp-value.h	2014-12-19 09:55:26.268851025 -0800
@@ -95,6 +95,9 @@
         uintptr_t nxsz;
         uint16_t  real;
         uint16_t  refs;
+#if defined(__sun) && defined(__sparcv9)
+	 uint32_t pad_gcc_align_hack;
+#endif
         SEXP_t    memb[];
 } __attribute__ ((packed));

--- openscap-1.2.3/src/OVAL/probes/SEAP/sexp-value.c.~1~	2015-09-10 15:14:06.694228778 -0700
+++ openscap-1.2.3/src/OVAL/probes/SEAP/sexp-value.c	2015-09-10 15:15:53.755827733 -0700
@@ -119,7 +119,7 @@
         _A(sz < 16);
 
         if (sm_memalign ((void **)(void *)&lblk, SEXP_LBLK_ALIGN,
-                         sizeof (uintptr_t) + (2 * sizeof (uint16_t)) + (sizeof (SEXP_t) * (1 << sz))) != 0) {
+                         sizeof (struct SEXP_val_lblk) + (sizeof (SEXP_t) * (1 << sz))) != 0) {
                 /* TODO: handle this */
                 abort ();
                 return ((uintptr_t) NULL);