summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2014-11-12 00:57:55 +0100
committerGuillem Jover <guillem@debian.org>2014-11-22 18:52:15 +0100
commitbd3f720ca063c581ca5c446ba8bb9b3318d6dd3d (patch)
treede8b1ac50030a5281b0be944083b30690c1230cb
parent611305ef0e85092cc24887e040c19e9e808dd633 (diff)
downloaddpkg-bd3f720ca063c581ca5c446ba8bb9b3318d6dd3d.tar.gz
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 <dominyktiller@gmail.com>
-rw-r--r--debian/changelog2
-rw-r--r--lib/dpkg/fdio.c8
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 <megamansec@gmail.com>.
* 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 <dominyktiller@gmail.com>.
[ 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. */