Skip to contentSkip to conversation

Fix compilation of busybox 1.21.1

PATCH Superseded Jérôme Pouiller 3 participants 3 messages Oct 8, 2013

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix compilation of busybox 1.21.1

It seems patches previously applied on busybox 1.20.2 are also needed for version 1.21.1.

---

 .../busybox/1.21.1/busybox-1.21.1-kernel_ver.patch |   25 ++++
 package/busybox/1.21.1/busybox-1.21.1-ntpd.patch   |   11 ++
 .../1.21.1/busybox-1.21.1-pkg-config-selinux.patch |   67 +++++++++++
 .../1.21.1/busybox-1.21.1-sys-resource.patch       |  123 ++++++++++++++++++++
 4 files changed, 226 insertions(+)
 create mode 100644 package/busybox/1.21.1/busybox-1.21.1-kernel_ver.patch
 create mode 100644 package/busybox/1.21.1/busybox-1.21.1-ntpd.patch
 create mode 100644 package/busybox/1.21.1/busybox-1.21.1-pkg-config-selinux.patch
 create mode 100644 package/busybox/1.21.1/busybox-1.21.1-sys-resource.patch
package/busybox/1.21.1/busybox-1.21.1-kernel_ver.patch new file +25 -0
new file mode 100644
index 0000000..d54d243
@@ -0,0 +1,25 @@
+--- a/libbb/kernel_version.c
++++ b/libbb/kernel_version.c
+@@ -20,18 +20,15 @@
+ int FAST_FUNC get_linux_version_code(void)
+ {
+ 	struct utsname name;
+-	char *s;
++	char *s, *t;
+ 	int i, r;
+ 
+-	if (uname(&name) == -1) {
+-		bb_perror_msg("can't get system information");
+-		return 0;
+-	}
+-
++	uname(&name); /* never fails */
+ 	s = name.release;
+ 	r = 0;
+ 	for (i = 0; i < 3; i++) {
+-		r = r * 256 + atoi(strtok(s, "."));
++		t = strtok(s, ".");
++		r = r * 256 + (t ? atoi(t) : 0);
+ 		s = NULL;
+ 	}
+ 	return r;
package/busybox/1.21.1/busybox-1.21.1-ntpd.patch new file +11 -0
new file mode 100644
index 0000000..0841348
@@ -0,0 +1,11 @@
+--- a/networking/ntpd.c
++++ b/networking/ntpd.c
+@@ -1840,7 +1840,7 @@ recv_and_process_client_pkt(void /*int f
+ 
+ 	/* Build a reply packet */
+ 	memset(&msg, 0, sizeof(msg));
+-	msg.m_status = G.stratum < MAXSTRAT ? G.ntp_status : LI_ALARM;
++	msg.m_status = G.stratum < MAXSTRAT ? (G.ntp_status & LI_MASK) : LI_ALARM;
+ 	msg.m_status |= (query_status & VERSION_MASK);
+ 	msg.m_status |= ((query_status & MODE_MASK) == MODE_CLIENT) ?
+ 			 MODE_SERVER : MODE_SYM_PAS;
package/busybox/1.21.1/busybox-1.21.1-pkg-config-selinux.patch new file +67 -0

67 lines not on this page · raw message

package/busybox/1.21.1/busybox-1.21.1-sys-resource.patch new file +123 -0

123 lines not on this page · raw message

Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 Fix compilation of busybox 1.21.1

Dear J?r?me Pouiller,

Quoted 7 lines · J?r?me Pouiller

It seems patches previously applied on busybox 1.20.2 are also needed for version 1.21.1.

---

 .../busybox/1.21.1/busybox-1.21.1-kernel_ver.patch |   25 ++++
 package/busybox/1.21.1/busybox-1.21.1-ntpd.patch   |   11 ++

Those two patches lack the description + Signed-off-by.

The first patch is 556ac3633ce3e7bd51c93b78827ae3874d856257 upstream, and the second patch is b7841cf7b919b16d1bd4619154bf7cb4c22b4ccd.

Thomas

Signature · 3 lines
Thomas Petazzoni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#2 lore raw

PATCH 1/1 Fix compilation of busybox 1.21.1

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

Thomas> Dear J?r?me Pouiller,

Quoted 7 lines · J?r?me Pouiller
Quoted 7 lines

It seems patches previously applied on busybox 1.20.2 are also needed for version 1.21.1.

---

.../busybox/1.21.1/busybox-1.21.1-kernel_ver.patch |   25 ++++
package/busybox/1.21.1/busybox-1.21.1-ntpd.patch   |   11 ++

Thomas> Those two patches lack the description + Signed-off-by.

Thomas> The first patch is 556ac3633ce3e7bd51c93b78827ae3874d856257 upstream, Thomas> and the second patch is b7841cf7b919b16d1bd4619154bf7cb4c22b4ccd.

But:

git describe --contains 556ac3633ce3e7bd51c93b78827ae3874d856257 1_21_0~181

git describe --contains b7841cf7b919b16d1bd4619154bf7cb4c22b4ccd 1_21_0~27

E.G. both are in 1.21.x?

Signature · 1 line
Bye, Peter Korsgaard