From bd3f720ca063c581ca5c446ba8bb9b3318d6dd3d Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Wed, 12 Nov 2014 00:57:55 +0100 Subject: libdpkg: Fix fd_allocate_size() function to build on Mac OS X Add missing semicolons to fcntl() call, and rename fs_preallocate_setup() call sites to fd_preallocate_setup() on Mac OS X codepath. Regression introduced in commit 87b0b20b86407baf1deb4e91b3fd839e01228ac8. Reported-by: Dominyk Tiller --- debian/changelog | 2 ++ lib/dpkg/fdio.c | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 817ef06dc..322c95468 100644 --- a/debian/changelog +++ b/debian/changelog @@ -17,6 +17,8 @@ dpkg (1.17.22) UNRELEASED; urgency=low Reported by Joshua Rogers . * Do not match partial field names in control files. Closes: #769119 Regression introduced in dpkg 1.10. + * Fix build on Mac OS X. Regression introduced in dpkg 1.17.11. + Reported by Dominyk Tiller . [ Updated programs translations ] * German (Sven Joachim). diff --git a/lib/dpkg/fdio.c b/lib/dpkg/fdio.c index 9ac2128e7..38781c887 100644 --- a/lib/dpkg/fdio.c +++ b/lib/dpkg/fdio.c @@ -109,13 +109,13 @@ fd_allocate_size(int fd, off_t offset, off_t len) /* On Mac OS X. */ fstore_t fs; - fs_preallocate_setup(&fs, F_ALLOCATECONTIG, offset, len); - rc = fcntl(fd, F_PREALLOCATE, &fs) + fd_preallocate_setup(&fs, F_ALLOCATECONTIG, offset, len); + rc = fcntl(fd, F_PREALLOCATE, &fs); if (rc < 0 && errno == ENOSPC) { /* If we cannot get a contiguous allocation, then try * non-contiguous. */ - fs_preallocate_setup(&fs, F_ALLOCATEALL, offset, len); - rc = fcntl(fd, F_PREALLOCATE, &fs) + fd_preallocate_setup(&fs, F_ALLOCATEALL, offset, len); + rc = fcntl(fd, F_PREALLOCATE, &fs); } #elif defined(HAVE_F_ALLOCSP64) /* On Solaris. */ -- cgit v1.2.3