Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id C77F4407696 for ; Sat, 7 Jan 2012 15:26:42 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pDLD6qTKcXdb for ; Sat, 7 Jan 2012 15:26:42 -0800 (PST) Received: from mail-ee0-f53.google.com (mail-ee0-f53.google.com [74.125.83.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 2C49840A282 for ; Sat, 7 Jan 2012 15:26:35 -0800 (PST) Received: by eekd41 with SMTP id d41so2133471eek.26 for ; Sat, 07 Jan 2012 15:26:33 -0800 (PST) Received: by 10.14.50.145 with SMTP id z17mr4076618eeb.104.1325978793819; Sat, 07 Jan 2012 15:26:33 -0800 (PST) Received: from localhost (dsl-hkibrasgw4-fe5cdc00-23.dhcp.inet.fi. [80.220.92.23]) by mx.google.com with ESMTPS id a60sm268636780eeb.4.2012.01.07.15.26.32 (version=SSLv3 cipher=OTHER); Sat, 07 Jan 2012 15:26:32 -0800 (PST) From: Jani Nikula To: notmuch@notmuchmail.org Subject: [RFC PATCH 2/9] xutil: #define _POSIX_C_SOURCE to get strdup() Date: Sun, 8 Jan 2012 01:26:16 +0200 Message-Id: X-Mailer: git-send-email 1.7.5.4 In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jan 2012 23:26:43 -0000 strdup() is not standard C99. #define _POSIX_C_SOURCE 200809L to use it. This fixes -std=c99 -pedantic warning: util/xutil.c: In function ‘xstrdup’: util/xutil.c:74:5: warning: implicit declaration of function ‘strdup’ [-Wimplicit-function-declaration] util/xutil.c:74:9: warning: assignment makes pointer from integer without a cast [enabled by default] Signed-off-by: Jani Nikula --- util/xutil.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/util/xutil.c b/util/xutil.c index ac496da..55b818b 100644 --- a/util/xutil.c +++ b/util/xutil.c @@ -18,6 +18,8 @@ * Author: Carl Worth */ +#define _POSIX_C_SOURCE 200809L /* for strdup() */ + #include #include -- 1.7.5.4