forked from pool/libguestfs
* proto: Fix stack overflow when there are many progress events (RHBZ#909624). * rescue: Count the mountable filesystems when displaying the 'suggest' message. * lib: Define CLEANUP_CMD_CLOSE macro and use it throughout the library. * lib: Allow guestfs_free_* functions to be safely called with a NULL pointer. * btrfs: Fix btrfs_subvolume_list on F18 (RHBZ#903620). * daemon: Check parameter of base64-out and tar-out before running external command (RHBZ#908322). * daemon: download: Add extra check that download file is not a directory (RHBZ#908321). * daemon: Add more information to certain calls to perror. * daemon: Call wipefs before mkfs to work around pathological behaviour in btrfs. * lib: Add CLEANUP_* macros which automatically free things when leaving scope. * header: Deprecate LIBGUESTFS_HAVE_* in favour of GUESTFS_HAVE_*. * fuse: Use guestfs_rename to implement rename(2) syscall (RHBZ#895910). * New API: rename: Rename file within the same filesystem (RHBZ#895910). * fuse: If guestfs_last_errno returns 0, don't return no error to FUSE layer. * daemon: Change ln, ln-f (hard-link) APIs to use link(2) instead of external ln (RHBZ#895905). * Fix checksums-out command (RHBZ#895904). * launch: appliance: Fix parsing of QEMU_OPTIONS. * launch: appliance: Small refactoring of virtio-scsi detection code. - enable ruby bindings only in 12.2 or later, ruby is too fragile OBS-URL: https://build.opensuse.org/package/show/Virtualization/libguestfs?expand=0&rev=190
39 lines
1.5 KiB
Diff
39 lines
1.5 KiB
Diff
From 8a06055533023aea942cdce548e0befaf7562ebc Mon Sep 17 00:00:00 2001
|
|
From: Olaf Hering <olaf@aepfle.de>
|
|
Date: Mon, 25 Feb 2013 10:53:24 +0100
|
|
Subject: [PATCH] lib: avoid pragma usage in inspect-fs-windows
|
|
|
|
pragma GCC diagnostic is a gcc 4.6+ feature, compilation fails with
|
|
older compilers:
|
|
|
|
inspect-fs-windows.c: In function 'map_registry_disk_blob':
|
|
inspect-fs-windows.c:502: error: #pragma GCC diagnostic not allowed inside functions
|
|
inspect-fs-windows.c:503: error: #pragma GCC diagnostic not allowed inside functions
|
|
inspect-fs-windows.c:505: error: #pragma GCC diagnostic not allowed inside functions
|
|
make[3]: *** [libguestfs_la-inspect-fs-windows.lo] Error 1
|
|
|
|
Use memcpy instead of pragma to fix compile error.
|
|
|
|
Signed-off-by: Olaf Hering <olaf@aepfle.de>
|
|
---
|
|
src/inspect-fs-windows.c | 6 ++----
|
|
1 file changed, 2 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/src/inspect-fs-windows.c b/src/inspect-fs-windows.c
|
|
index 346cc55..68ae97c 100644
|
|
--- a/src/inspect-fs-windows.c
|
|
+++ b/src/inspect-fs-windows.c
|
|
@@ -499,10 +499,8 @@ map_registry_disk_blob (guestfs_h *g, const void *blob)
|
|
* Note deliberate cast-align violation here since the data is in a
|
|
* very odd place within the blob. Thanks Microsoft!
|
|
*/
|
|
-#pragma GCC diagnostic push
|
|
-#pragma GCC diagnostic ignored "-Wcast-align"
|
|
- part_offset = le64toh (* (uint64_t *) ((char *) blob + 4));
|
|
-#pragma GCC diagnostic pop
|
|
+ memcpy(&part_offset, (char *) blob + 4, sizeof(part_offset));
|
|
+ part_offset = le64toh (part_offset);
|
|
|
|
partitions = guestfs_part_list (g, devices[i]);
|
|
if (partitions == NULL)
|