libcgroup: FTBFS on ia64

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.

Bug-Debian: https://bugs.debian.org/886744
Last-Update: 2019-02-22


Gbp-Pq: Name cgrulesengd-_GNU_SOURCE.patch
This commit is contained in:
James Clarke 2018-01-09 13:23:26 +00:00 committed by Lu zhiping
parent 83497af3d5
commit 0c8f2a0be7
2 changed files with 4 additions and 10 deletions

View File

@ -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"

View File

@ -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)))