From patchwork Sun Jun 16 13:06:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yann Sionneau X-Patchwork-Id: 1116528 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=uclibc-ng.org (client-ip=2a00:1828:2000:679::23; helo=helium.openadk.org; envelope-from=devel-bounces@uclibc-ng.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=sionneau.net Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=sionneau.net header.i=@sionneau.net header.b="0oLjkqtI"; dkim-atps=neutral Received: from helium.openadk.org (helium.openadk.org [IPv6:2a00:1828:2000:679::23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45RZPN5sTTz9sNC for ; Sun, 16 Jun 2019 23:07:02 +1000 (AEST) Received: from helium.openadk.org (localhost [IPv6:::1]) by helium.openadk.org (Postfix) with ESMTP id 60C52100D4; Sun, 16 Jun 2019 15:06:51 +0200 (CEST) X-Original-To: devel@uclibc-ng.org Delivered-To: devel@helium.openadk.org Received: from mx3.sionneau.net (mx3.sionneau.net [163.172.183.177]) by helium.openadk.org (Postfix) with ESMTPS id D535E100D4 for ; Sun, 16 Jun 2019 15:06:47 +0200 (CEST) Received: from mx3.sionneau.net (localhost [127.0.0.1]) by mx3.sionneau.net. (OpenSMTPD) with ESMTP id 7df5eaac for ; Sun, 16 Jun 2019 13:06:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=simple; d=sionneau.net; h=from:to:cc :subject:date:message-id; s=selectormx3; bh=uUCACukln+ir6cQSxfO/ iBSpNXk=; b=0oLjkqtIdCMDRk3j+PLcsYg/osW71PiWCn6kX9Qay1jBrfJ2HDyD Uw4IdMCpiN47zYqXQuSCCheX+XzEeL0ebiBbwav0dLXMog1v8JtM9p/2JGuTFFN6 NR+N8KMq9QTO5oYIcnGShJu+uWZ7OgLzy1e87PhmORoP0WCOZs0zb6c= DomainKey-Signature: a=rsa-sha1; c=simple; d=sionneau.net; h=from:to:cc :subject:date:message-id; q=dns; s=selectormx3; b=KRA10L3ZCN7vlc M6AfmETxQa+QmsKZ+2cTWEZiuGqdM8LzKQ4RIhyuZxmAgEGlLbNNlE0Kcwm5Cb/R HbLgYCpg4ag9nmEx/k4EyBk7aC931du2hCC4WPErp3G8l+2ENYytq2dYJxyjuMU9 C3eoZQdHkJsDTDhqASxZar4jlIDYM= Received: by mx3.sionneau.net (OpenSMTPD) with ESMTPSA id 87f56b1b (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128:NO); Sun, 16 Jun 2019 13:06:48 +0000 (UTC) From: Yann Sionneau To: devel@uclibc-ng.org Date: Sun, 16 Jun 2019 15:06:42 +0200 Message-Id: <20190616130642.7119-1-yann@sionneau.net> X-Mailer: git-send-email 2.17.1 Subject: [uclibc-ng-devel] [PATCH] Fix compilation issue when libuargp is compiled without __UCLIBC_HAS_PROGRAM_INVOCATION_NAME__ X-BeenThere: devel@uclibc-ng.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: uClibc-ng Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: devel-bounces@uclibc-ng.org Sender: "devel" This fixes the issue reported at https://github.com/wbx-github/uclibc-ng/issues/2 Signed-off-by: Yann Sionneau --- libuargp/argp-parse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libuargp/argp-parse.c b/libuargp/argp-parse.c index ecd5e7eb6..030bc4f9f 100644 --- a/libuargp/argp-parse.c +++ b/libuargp/argp-parse.c @@ -112,7 +112,7 @@ argp_default_parser (int key, char *arg, struct argp_state *state) break; case OPT_PROGNAME: /* Set the program name. */ -#if defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_NAME +#if defined _LIBC && defined(__UCLIBC_HAS_PROGRAM_INVOCATION_NAME__) program_invocation_name = arg; #endif /* [Note that some systems only have PROGRAM_INVOCATION_SHORT_NAME (aka @@ -126,7 +126,7 @@ argp_default_parser (int key, char *arg, struct argp_state *state) else state->name = arg; -#if defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME +#if defined _LIBC && defined(__UCLIBC_HAS_PROGRAM_INVOCATION_NAME__) program_invocation_short_name = state->name; #endif