Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] squashfs3: fix build with uClibc
@ 2012-03-15 16:15 Markos Chandras
  2012-03-15 20:48 ` Peter Korsgaard
  0 siblings, 1 reply; 2+ messages in thread
From: Markos Chandras @ 2012-03-15 16:15 UTC (permalink / raw)
  To: buildroot

The squashfs3 package uses the old get_nprocs() GNU extension which does not
exist in uClibc. This has already been fixed in newer squashfs releases (>=4.0).
The patch is similar to the one committed in
dfa2a513e1aa7f6ec47f630c5d31d98cd098f408

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
---
 package/squashfs3/squashfs3-3.4-get_nprocs.patch |   26 ++++++++++++++++++++++
 1 files changed, 26 insertions(+), 0 deletions(-)
 create mode 100644 package/squashfs3/squashfs3-3.4-get_nprocs.patch

diff --git a/package/squashfs3/squashfs3-3.4-get_nprocs.patch b/package/squashfs3/squashfs3-3.4-get_nprocs.patch
new file mode 100644
index 0000000..e6901de
--- /dev/null
+++ b/package/squashfs3/squashfs3-3.4-get_nprocs.patch
@@ -0,0 +1,26 @@
+Index: squashfs3-3.4/squashfs-tools/mksquashfs.c
+===================================================================
+--- squashfs3-3.4.orig/squashfs-tools/mksquashfs.c
++++ squashfs3-3.4/squashfs-tools/mksquashfs.c
+@@ -3178,7 +3178,7 @@ void initialise_threads()
+ 			processors = 1;
+ 		}
+ #else
+-		processors = get_nprocs();
++		processors = sysconf(_SC_NPROCESSORS_CONF);
+ #endif
+ 	}
+ 
+Index: squashfs3-3.4/squashfs-tools/unsquashfs.c
+===================================================================
+--- squashfs3-3.4.orig/squashfs-tools/unsquashfs.c
++++ squashfs3-3.4/squashfs-tools/unsquashfs.c
+@@ -2428,7 +2428,7 @@ void initialise_threads(int fragment_buf
+ 			processors = 1;
+ 		}
+ #else
+-		processors = get_nprocs();
++		processors = sysconf(_SC_NPROCESSORS_CONF);
+ #endif
+ 	}
+ 
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-03-15 20:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-15 16:15 [Buildroot] [PATCH] squashfs3: fix build with uClibc Markos Chandras
2012-03-15 20:48 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox