[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#623159: cupt: FTBFS on hurd: 'WIFCONTINUED' was not declared



Source: cupt
Version: 2.0.0~rc2
Severity: important
Tags: patch

Hi,

Building cupt on hurd, I get (transcribed by hand):

| [  3%] Building CXX object cpp/lib/CMakeFiles/cupt2.dir/src/internal/common.cpp.o
| /home/jrn/src/cupt/cpp/lib/src/internal/common.cpp: In function 'std::string cupt::internal::getWaitStatusDescription(int)':
| /home/jrn/src/cupt/cpp/lib/src/internal/common.cpp:76:30: error: 'WIFCONTINUED' was not declared in this scope
| /home/jrn/src/cupt/cpp/lib/src/internal/common.cpp:88:1: warning: control reached end of non-void function
| make[3]: *** [cpp/lib/CMakeFiles/cupt2.dir/src/internal/common.cpp.o] Error 1
[...]

Indeed, WIFCONTINUED is an XSI extension that libc0.3-dev 2.11.2-13 does
not provide (since WCONTINUED is not defined in
/usr/include/bits/waitflags.h).  Luckily, cupt does not use the
WCONTINUED flag, so the check to WIFCONTINUED(status) would never
succeed anyway.  How about something like this?

-- 8< --
Subject: lib: internal: common: getWaitStatusDescription: do not check WIFCONTINUED(status)

cupt does not pass WCONTINUED to waitpid(2), so WIFCONTINUED(status)
cannot be true.  Simplify by not checking it.  This fixes a failure to
build from source on systems that do not implement WCONTINUED (like
hurd with eglibc 2.11.2-13).

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
 cpp/lib/src/internal/common.cpp |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/cpp/lib/src/internal/common.cpp b/cpp/lib/src/internal/common.cpp
index 2f1f144..a267f42 100644
--- a/cpp/lib/src/internal/common.cpp
+++ b/cpp/lib/src/internal/common.cpp
@@ -73,10 +73,6 @@ string getWaitStatusDescription(int status)
 	{
 		return sf("stopped by signal '%s'", strsignal(WSTOPSIG(status)));
 	}
-	else if (WIFCONTINUED(status))
-	{
-		return sf("continued");
-	}
 	else if (WIFEXITED(status))
 	{
 		return sf("exit code '%d'", WEXITSTATUS(status));
-- 
1.7.5.rc2




Reply to: