Files
meta-openembedded/meta-oe/recipes-connectivity/inetutils/inetutils-1.8/inetutils-1.8-0002-argp-fix-program_invocation_name-detection.patch
Zhenhua Luo 8b08e15164 ietutils: add version 1.0
The GNU inetutils are a collection of common networking utilities
    and servers including ftp, ftpd, rcp, rexec, rlogin, rlogind, rsh,
    rshd, syslog, syslogd, talk, talkd, telnet, telnetd, tftp, tftpd,
    and uucpd.

Signed-off-by: Zhenhua Luo <b19537@freescale.com>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
2011-12-22 08:49:16 +01:00

52 lines
1.7 KiB
Diff

From 93dbd3319232613ff8f5f3f08bf5f57b21980ef1 Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier at gentoo.org>
Date: Thu, 18 Nov 2010 17:14:21 -0500
Subject: [PATCH gnulib] argp: fix program_invocation_name detection
The current program_invocation_name symbol detection fails if the argp.h
header is missing. So check for the header first before detecting if the
symbol exists.
Signed-off-by: Mike Frysinger <vapier at gentoo.org>
---
m4/argp.m4 | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/m4/argp.m4 b/m4/argp.m4
index d3ca5ba..efa562c 100644
--- a/m4/argp.m4
+++ b/m4/argp.m4
@@ -31,8 +31,14 @@ AC_DEFUN([gl_ARGP],
# are defined elsewhere. It is improbable that only one of them will
# be defined and other not, I prefer to stay on the safe side and to
# test each one separately.
+ AC_CHECK_HEADERS_ONCE([argp.h])
AC_MSG_CHECKING([whether program_invocation_name is defined])
- AC_TRY_LINK([#include <argp.h>],
+ AC_TRY_LINK([
+#include <errno.h>
+#ifdef HAVE_ARGP_H
+# include <argp.h>
+#endif
+],
[ program_invocation_name = "test"; ],
[ AC_DEFINE([HAVE_PROGRAM_INVOCATION_NAME], [1],
[Define if program_invocation_name is defined])
@@ -40,7 +46,12 @@ AC_DEFUN([gl_ARGP],
[ AC_MSG_RESULT([no])] )
AC_MSG_CHECKING([whether program_invocation_short_name is defined])
- AC_TRY_LINK([#include <argp.h>],
+ AC_TRY_LINK([
+#include <errno.h>
+#ifdef HAVE_ARGP_H
+# include <argp.h>
+#endif
+],
[ program_invocation_short_name = "test"; ],
[ AC_DEFINE([HAVE_PROGRAM_INVOCATION_SHORT_NAME], [1],
[Define if program_invocation_short_name is defined])
--
1.7.3.2