Bug#886744: libcgroup: FTBFS on ia64

James Clarke <[email protected]>
Newsgroups gmane.linux.debian.ports.ia64
Message-ID <20180109132326.GA26267__14581.9271718667$1515504329$gmane$org@Jamess-MacBook.local>
Source: libcgroup
Version: 0.41-8
Tags: upstream patch
User: [email protected]
Usertags: ia64
X-Debbugs-Cc: [email protected]

Hi,
Currently libcgroup FTBFS on ia64. This is a result of cgrulesengd.h
defining __USE_GNU itself after features.h has been included, and since
_GNU_SOURCE was not defined before features.h was included, this breaks
assumptions in the glibc headers about the implications of the different
__USE_FOO macros, eventually leading to siginfo-consts-arch.h being
included but TRAP_TRACE not having been defined (which is guarded by
__USE_XOPEN_EXTENDED). The attached patch fixes this on ia64, although
is untested elsewhere.

Regards,
James
cgrulesengd-_GNU_SOURCE.patch (text/plain, 853 B)
--- a/src/daemon/cgrulesengd.c
+++ b/src/daemon/cgrulesengd.c
@@ -31,6 +31,10 @@
  * TODO Stop using netlink for communication (or at least rewrite that part).
  */
 
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+
 #include "libcgroup.h"
 #include "cgrulesengd.h"
 #include "../libcgroup-internal.h"
--- a/src/daemon/cgrulesengd.h
+++ b/src/daemon/cgrulesengd.h
@@ -15,8 +15,6 @@
 #ifndef _CGRULESENGD_H
 #define _CGRULESENGD_H
 
-#include <features.h>
-
 __BEGIN_DECLS
 
 #include "config.h"
@@ -24,14 +22,6 @@ __BEGIN_DECLS
 #include <linux/connector.h>
 #include <linux/cn_proc.h>
 
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
-#ifndef __USE_GNU
-#define __USE_GNU
-#endif
-
 /* The following ten macros are all for the Netlink code. */
 #define SEND_MESSAGE_LEN (NLMSG_LENGTH(sizeof(struct cn_msg) + \
 	sizeof(enum proc_cn_mcast_op)))
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.