Skip to contentSkip to conversation

coreutils: get the uptime program to work

PATCH New Thomas Petazzoni 3 participants 3 messages Sep 10, 2014 – Sep 13, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 coreutils: get the uptime program to work

coreutils configure script needs to know whether /proc/uptime is available, but this is not possible in a cross-compilation context. This leads to an uptime program that fails to work on the target, as it has been compiled without /proc/uptime reading support.

This commit fixes that by telling coreutils at configure time that /proc/uptime will be available on the target (which seems to be a reasonable assumption on Linux systems).

---
 package/coreutils/coreutils.mk | 1 +
 1 file changed, 1 insertion(+)
package/coreutils/coreutils.mk +1 -0
index 07a1347..e6af7e2 100644
@@ -57,6 +57,7 @@ COREUTILS_CONF_ENV = ac_cv_c_restrict=no \
 		gl_cv_func_working_mkstemp=yes \
 		gl_cv_func_working_utimes=yes \
 		gl_getline_needs_run_time_check=no \
+		gl_cv_have_proc_uptime=yes \
 		utils_cv_localtime_cache=no \
 		PERL=missing
 
Signature · 1 line
2.0.0
#1 lore raw

PATCH 1/1 coreutils: get the uptime program to work

Dear ThomasP,

Quoted 20 lines · Thomas Petazzoni

coreutils configure script needs to know whether /proc/uptime is available, but this is not possible in a cross-compilation context. This leads to an uptime program that fails to work on the target, as it has been compiled without /proc/uptime reading support.

This commit fixes that by telling coreutils at configure time that /proc/uptime will be available on the target (which seems to be a reasonable assumption on Linux systems).

---
  package/coreutils/coreutils.mk | 1 +
  1 file changed, 1 insertion(+)
package/coreutils/coreutils.mk +0 -0
index 07a1347..e6af7e2 100644

package/coreutils/coreutils.mk COREUTILS_CONF_ENV = ac_cv_c_restrict=no \ · line 63

Quoted 7 lines
package/coreutils/coreutils.mk +1 -0
@@ -57,6 +57,7 @@ COREUTILS_CONF_ENV = ac_cv_c_restrict=no \
  		gl_cv_func_working_mkstemp=yes \
  		gl_cv_func_working_utimes=yes \
  		gl_getline_needs_run_time_check=no \
+		gl_cv_have_proc_uptime=yes \
  		utils_cv_localtime_cache=no \
  		PERL=missing
 

Welcome to Buildroot
(none) login: root

# uptime
  00:00am  up   0:00,  1 user,  load average: 0.46, 0.00, 0.10

It works :)

Signature · 1 line
Vincent
#2 lore raw

PATCH 1/1 coreutils: get the uptime program to work

In reply to Thomas Petazzoni
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

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

coreutils configure script needs to know whether /proc/uptime is available, but this is not possible in a cross-compilation context. This leads to an uptime program that fails to work on the target, as it has been compiled without /proc/uptime reading support.

Quoted 5 lines

This commit fixes that by telling coreutils at configure time that /proc/uptime will be available on the target (which seems to be a reasonable assumption on Linux systems).

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard