aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2019-05-11 12:12:26 -0700
committerGitHub <noreply@github.com>2019-05-11 12:12:26 -0700
commit5b742358b65c8dcb3c14e510839b4eff9d7dfc20 (patch)
treeb8c2ec9c5e7078f50be8b5c055d16dbeb310ae39 /utils
parent77bdda3e03eb69bbf75506dd4dbbc1a0427404ed (diff)
parent4639e208b3b159d8c85361682936b3941fb996b4 (diff)
Merge pull request #8907 from neheb/hfs
hfsprogs: Fix compilation with uClibc-ng
Diffstat (limited to 'utils')
-rw-r--r--utils/hfsprogs/Makefile2
-rw-r--r--utils/hfsprogs/patches/010-valloc-to-memalign.patch20
2 files changed, 21 insertions, 1 deletions
diff --git a/utils/hfsprogs/Makefile b/utils/hfsprogs/Makefile
index 9300fbc0a..e5184280e 100644
--- a/utils/hfsprogs/Makefile
+++ b/utils/hfsprogs/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=hfsprogs
PKG_VERSION:=332.25
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_LICENSE:=GPL-3.0+
PKG_LICENSE_FILES:=COPYING
diff --git a/utils/hfsprogs/patches/010-valloc-to-memalign.patch b/utils/hfsprogs/patches/010-valloc-to-memalign.patch
new file mode 100644
index 000000000..c391e1dd5
--- /dev/null
+++ b/utils/hfsprogs/patches/010-valloc-to-memalign.patch
@@ -0,0 +1,20 @@
+--- a/newfs_hfs.tproj/makehfs.c
++++ b/newfs_hfs.tproj/makehfs.c
+@@ -376,7 +376,7 @@ make_hfsplus(const DriveInfo *driveInfo, hfsparams_t *defaults)
+ if ( (temp & 0x01FF) != 0 )
+ temp = (temp + kBytesPerSector) & 0xFFFFFE00;
+
+- nodeBuffer = valloc((size_t)temp);
++ (void)posix_memalign(&nodeBuffer, sysconf(_SC_PAGESIZE), (size_t)temp);
+ if (nodeBuffer == NULL)
+ err(1, NULL);
+
+@@ -1814,7 +1814,7 @@ ClearDisk(const DriveInfo *driveInfo, UInt64 startingSector, UInt32 numberOfSect
+
+ bufferSize = bufferSizeInSectors << kLog2SectorSize;
+
+- tempBuffer = valloc((size_t)bufferSize);
++ (void)posix_memalign(&tempBuffer, sysconf(_SC_PAGESIZE), (size_t)bufferSize);
+ if (tempBuffer == NULL)
+ err(1, NULL);
+