[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] build: avoid link failure when strerror is replaced
From: |
Jim Meyering |
Subject: |
[PATCH] build: avoid link failure when strerror is replaced |
Date: |
Fri, 05 Oct 2012 22:36:13 +0200 |
FYI,
>From f947735d3c4036703e03bf6970784430db1355f7 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Fri, 5 Oct 2012 22:35:27 +0200
Subject: [PATCH] build: avoid link failure when strerror is replaced
When building the new make-prime-list program on a system for which
strerror is defined to rpl_strerror, we'd get a link failure.
The problem is that we're including <config.h> for some definitions,
but do not want the rpl_ ones, since this particular program must
not be linked against gnulib (aka libcoreutils.a). This did not
arise on Fedora 17 or 18, but did on Debian wheezy/sid.
* src/make-prime-list.c (strerror): #undef.
Build failure introduced by commit v8.19-152-gcf67e4c.
---
src/make-prime-list.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/make-prime-list.c b/src/make-prime-list.c
index 49db2ba..e0d9b81 100644
--- a/src/make-prime-list.c
+++ b/src/make-prime-list.c
@@ -24,7 +24,10 @@ this program. If not, see http://www.gnu.org/licenses/. */
#include <string.h>
#include <stdlib.h>
#include <errno.h>
+
+/* Deactivate config.h's "rpl_"-prefixed definitions of these symbols. */
#undef fclose
+#undef strerror
struct prime
{
--
1.8.0.rc0.18.gf84667d
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] build: avoid link failure when strerror is replaced,
Jim Meyering <=