[fedora-virt-maint] rpms/libguestfs/EL-5 0001-RHEL-5-Detect-endianness-functions-and-supply-them.patch, NONE, 1.1 libguestfs.spec, 1.73, 1.74
Richard W.M. Jones
rjones at fedoraproject.org
Thu Oct 29 17:57:58 UTC 2009
Author: rjones
Update of /cvs/pkgs/rpms/libguestfs/EL-5
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv6838
Modified Files:
libguestfs.spec
Added Files:
0001-RHEL-5-Detect-endianness-functions-and-supply-them.patch
Log Message:
- Pull in upstream patch to fix missing endianness functions on RHEL 5.
0001-RHEL-5-Detect-endianness-functions-and-supply-them.patch:
configure.ac | 2 +-
hivex/hivex.c | 31 ++++++++++++++++++++++++++++++-
hivex/hivexget.c | 2 ++
hivex/hivexml.c | 3 ++-
4 files changed, 35 insertions(+), 3 deletions(-)
--- NEW FILE 0001-RHEL-5-Detect-endianness-functions-and-supply-them.patch ---
>From a4e27cdf4d3b831792dd20d796dc98a5bc684290 Mon Sep 17 00:00:00 2001
From: Richard Jones <rjones at redhat.com>
Date: Thu, 29 Oct 2009 17:54:48 +0000
Subject: [PATCH] RHEL 5: Detect endianness functions and supply them.
---
configure.ac | 2 +-
hivex/hivex.c | 31 ++++++++++++++++++++++++++++++-
hivex/hivexget.c | 2 ++
hivex/hivexml.c | 2 ++
4 files changed, 35 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index a235a06..709b1b7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -123,7 +123,7 @@ dnl Check sizeof long.
AC_CHECK_SIZEOF([long])
dnl Headers.
-AC_CHECK_HEADERS([errno.h sys/types.h sys/un.h sys/wait.h sys/socket.h])
+AC_CHECK_HEADERS([errno.h sys/types.h sys/un.h sys/wait.h sys/socket.h endian.h byteswap.h])
dnl Check for rpcgen and XDR library. rpcgen is optional.
AC_CHECK_PROG([RPCGEN],[rpcgen],[rpcgen],[no])
diff --git a/hivex/hivex.c b/hivex/hivex.c
index 16be753..85d6c7b 100644
--- a/hivex/hivex.c
+++ b/hivex/hivex.c
@@ -18,11 +18,12 @@
* See file LICENSE for the full license.
*/
+#include <config.h>
+
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
-#include <endian.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
@@ -30,6 +31,34 @@
#include <sys/mman.h>
#include <sys/stat.h>
#include <assert.h>
+#ifdef HAVE_ENDIAN_H
+#include <endian.h>
+#endif
+#ifdef HAVE_BYTESWAP_H
+#include <byteswap.h>
+#endif
+
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+#ifndef be32toh
+#define be32toh(x) __bswap_32 (x)
+#endif
+#ifndef be64toh
+#define be64toh(x) __bswap_64 (x)
+#endif
+#ifndef le32toh
+#define le32toh(x) (x)
+#endif
+#else
+#ifndef be32toh
+#define be32toh(x) (x)
+#endif
+#ifndef be64toh
+#define be64toh(x) (x)
+#endif
+#ifndef le32toh
+#define le32toh(x) __bswap_32 (x)
+#endif
+#endif
#include "hivex.h"
diff --git a/hivex/hivexget.c b/hivex/hivexget.c
index 9bb6bbb..04c854f 100644
--- a/hivex/hivexget.c
+++ b/hivex/hivexget.c
@@ -16,6 +16,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+#include <config.h>
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/hivex/hivexml.c b/hivex/hivexml.c
index af3de9e..9dd394e 100644
--- a/hivex/hivexml.c
+++ b/hivex/hivexml.c
@@ -16,6 +16,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+#include <config.h>
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
--
1.6.5.rc2
Index: libguestfs.spec
===================================================================
RCS file: /cvs/pkgs/rpms/libguestfs/EL-5/libguestfs.spec,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -p -r1.73 -r1.74
--- libguestfs.spec 29 Oct 2009 17:26:40 -0000 1.73
+++ libguestfs.spec 29 Oct 2009 17:57:57 -0000 1.74
@@ -5,13 +5,17 @@ Summary: Access and modify virtual m
Name: libguestfs
Epoch: 1
Version: 1.0.75
-Release: 1%{?dist}
+Release: 1%{?dist}.2
License: LGPLv2+
Group: Development/Libraries
URL: http://libguestfs.org/
Source0: http://libguestfs.org/download/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
+# Next two lines should be removed in 1.0.76:
+Patch0: 0001-RHEL-5-Detect-endianness-functions-and-supply-them.patch
+BuildRequires: autoconf, automake, libtool, gettext-devel
+
# Currently fails on PPC because:
# "No Package Found for kernel"
ExclusiveArch: %{ix86} x86_64
@@ -319,6 +323,9 @@ Requires: jpackage-utils
%prep
%setup -q
+%patch0 -p1
+autoconf
+
mkdir -p daemon/m4
@@ -564,11 +571,12 @@ rm -rf $RPM_BUILD_ROOT
%changelog
-* Thu Oct 29 2009 Richard W.M. Jones <rjones at redhat.com> - 1.0.75-1
+* Thu Oct 29 2009 Richard W.M. Jones <rjones at redhat.com> - 1.0.75-1.el5.2
- New upstream release 1.0.75.
- New library: libhivex.
- New tools: virt-win-reg, hivexml, hivexget.
- Don't require chntpw.
+- Pull in upstream patch to fix missing endianness functions on RHEL 5.
* Tue Oct 20 2009 Richard W.M. Jones <rjones at redhat.com> - 1.0.74-1
- New upstream release 1.0.74.
More information about the Fedora-virt-maint
mailing list