lkml.org 
[lkml]   [2013]   [Oct]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH trace-cmd 1/5] trace-cmd/listen: Remove use of sighandler_t
On Thu, Oct 24, 2013 at 03:30:07PM -0500, Seth Forshee wrote:
> On Thu, Oct 24, 2013 at 02:14:30PM -0500, Seth Forshee wrote:
> > sighandler_t is a GNU extension and may not be defined if
> > _GNU_SOURCE is not set. To minimize the potential for build
> > problems, change signal_setup() to declare its handle argument
> > the same way struct sigaction declares the sa_handler member.
>
> I just saw that you've already got a commit to define _GNU_SOURCE on
> master. I was packaging v2.2.1 and didn't notice it, so you can ignore
> this one.

Turns out that fix doesn't work all the time. The following is also
required.


From 20ec8510d0ca2ac789b1ca9cf7b0a6dc2d02f14c Mon Sep 17 00:00:00 2001
From: Seth Forshee <seth.forshee@canonical.com>
Date: Mon, 28 Oct 2013 08:15:59 -0500
Subject: [PATCH] Makefile: Ensure _GNU_SOURCE really is always defined

When CLFAGS is set with a command argument a normal variable
assignment is not sufficient to ensure that _GNU_SOURCE will be
defined. Since this really is critical for building, use an
override directive when adding it to CFLAGS to ensure that it
really does get defined in all cases.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 1d613c4..a2ba385 100644
--- a/Makefile
+++ b/Makefile
@@ -223,7 +223,7 @@ CFLAGS ?= -g -Wall
LDFLAGS ?=

# Required CFLAGS
-CFLAGS += -D_GNU_SOURCE
+override CFLAGS += -D_GNU_SOURCE

ifndef NO_PTRACE
ifneq ($(call try-cc,$(SOURCE_PTRACE),),y)
--
1.8.3.2


\
 
 \ /
  Last update: 2013-10-28 17:21    [W:0.060 / U:3.952 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site